Skip to content

Instantly share code, notes, and snippets.

@komuw
Last active September 2, 2019 13:06
Show Gist options
  • Save komuw/8951db453f0b418198be453882ebe541 to your computer and use it in GitHub Desktop.
Save komuw/8951db453f0b418198be453882ebe541 to your computer and use it in GitHub Desktop.
flutter notes

docs:

A. https://docs.flutter.io/
B. https://flutter.io/setup
C. https://flutter.io/using-ide-vscode/
D. https://classroom.udacity.com/courses/ud905 google-udacity free course on flutter

  1. download latest beta build and untar
wget -nc --directory-prefix=/usr/local \
https://storage.googleapis.com/flutter_infra/releases/beta/linux/flutter_linux_v0.3.2-beta.tar.xz
sudo tar xf /usr/local/flutter_linux_v0.3.2-beta.tar.xz
  1. add flutter to path
cat /etc/profile
#flutter
export PATH=$PATH:/usr/local/flutter/bin
  1. download android studio
wget -nc --directory-prefix=/usr/local \
https://dl.google.com/dl/android/studio/ide-zips/3.1.2.0/android-studio-ide-173.4720617-linux.zip
sudo unzip /usr/local/android-studio-ide-173.4720617-linux.zip
  1. start android-studio
/usr/local/android-studio/bin/studio.sh # brings up setup wizard
  1. install kvm(useful for android emulator acceleration)
sudo apt -y update
sudo apt -y install qemu-kvm libvirt-bin ubuntu-vm-builder bridge-utils
virsh list --all # verify install
  1. accept android licenses
flutter doctor --android-licenses
  1. install dart/flutter plugins in android-studio
File>Settings>Plugins
  1. select a virtual device in android-studio
Tools>AVD Manager>create a device
- if unsure; use pixel2 and oreo android version.
- make sure graphics is set to: Software. the other options are hardware, automatic
- save then
- run/launch the avd
- if you run; flutter devices then that avd should show up
  1. run flutter doctor to make sure everything is ok
flutter doctor -v # it should not report any issues if everything is okay
  1. create app
flutter create hello
  1. run app
cd hello
flutter run \
--enable-software-rendering \
--skia-deterministic-rendering

there are other debug options; flutter help run

cd hello
flutter run \
--enable-software-rendering \
--skia-deterministic-rendering \
--trace-startup \
--observatory-port 8111 # Observatory debugger

or just use, for hardware rendering

flutter run
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment