Flutter

Build apps for Android, iOS and more from one Dart codebase, with a rendering engine that draws every pixel for consistent UI.

Beginner · about 4 hours · difficulty 2/5

Learn first: Development Environment, Emulators & Devices

Flutter is Google's UI toolkit. You write Dart code that composes widgets, and Flutter's engine renders them itself instead of using native UI components. That gives pixel-identical UI across platforms and very smooth custom graphics.

Strengths

  • Excellent tooling: flutter doctor diagnoses setup, hot reload is fast and reliable.
  • A rich set of Material and Cupertino widgets out of the box.
  • Great for highly branded, animation-heavy or custom-drawn interfaces.

How a project looks

Run flutter create my_app, then flutter run. Everything starts at main() calling runApp() with a root widget. UI is a tree of widgets like Scaffold, Column, Text and ElevatedButton. Dependencies live in pubspec.yaml and come from pub.dev.

Trade-offs

  • Dart is less widely used outside Flutter, so skills transfer less than JavaScript.
  • Because widgets are re-implemented, platform look-and-feel updates arrive only when Flutter updates them.
  • App binaries are somewhat larger than a minimal native app.

Good enough to move on: flutter doctor is green and you have modified the counter starter app on a device.

Key concepts

  • Installing Flutter and flutter doctor
  • Widgets as the unit of UI
  • Project layout and pubspec.yaml
  • Hot reload vs hot restart
  • Material and Cupertino widget sets
  • Flutter for web and desktop

Other options for this step

Mini project

Turn the Flutter counter starter into a tip calculator with a text field, a slider for tip percentage and a live total.

Check yourself

Flutter does not use native buttons. What are one advantage and one disadvantage of that design?

Free resources