Flutter is a cross-platform, mobile development framework created by Google. With user-centric design in mind, Flutter allows developers to create beautiful native apps on iOS and Android from a single codebase.
No experience with Flutter, Dart, or mobile programming is necessary. And while not required, some experience with programming is recommended. Please follow the instructions below to install the necessary software prior to the workshop.
Follow the instructions found on the flutter website to get started. When asked to setup your environment, choose VS Code (as opposed to Android Studio).
Once the installation is complete, validate your setup by running
flutter doctor in your terminal (Command Prompt / PowerShell on Windows) to ensure that everything is up and running.
Your output should look something like this:
[✓] Flutter (Channel beta, v1.0.0, on Mac OS X 10.14.2 18C54, locale en-US) [✓] Android toolchain - develop for Android devices (Andr [✓] iOS toolchain - develop for iOS devices (Xcode 10.1) [✓] Android Studio (version 3.1) [✓] VS Code (version 1.30.2) [✓] Connected device (1 available)
Flutter allows you to install your applications directly onto physical hardware using
flutter run. However, if you don’t have a device that you can use, you can install an emulator relatively easily.
iOS (macOS only)
To list all availabe emulators, run
flutter emulators. Your output should look something like this:
2 available emulators: Pixel_2_XL_API_28 • pixel_2_xl • Google • Pixel 2 XL API 28 apple_ios_simulator • iOS Simulator • Apple To run an emulator, run 'flutter emulators --launch <emulator id>'. To create a new emulator, run 'flutter emulators --create [--name xyz]'. You can find more information on managing emulators at the links below: https://developer.android.com/studio/run/managing-avds https://developer.android.com/studio/command-line/avdmanager
To launch an emulator, run
flutter emulators --launch <emulator_id>.
flutter doctorvalidates Flutter setup
flutter create <app_name>creates a new Flutter project
flutter emulatorslists all availabe Flutter emulators
flutter emulators --launch <emulator_id>launches a Flutter emulator
flutter runruns a Flutter application in Debug Mode
Rwhile running app performs a full app restart
rwhile running app performs a hot reload
flutter run --releaseruns a Flutter application in Release Mode (physical devices only)
flutter cleandeletes all Flutter build files
The presentation slides here.
The lab can be found on GitHub.