Mobile development

Stage 2 of 7 · 10 lessons · ~3 months

Widgets and layout

Build screens the way your platform expects: small composable pieces, layout, lists, images, forms and theming. The aim is to turn a design into a screen that looks right on a small phone and a large one.

Start: Widgets and the widget tree

Lessons· one lesson for each topic, in this order

  1. 1Widgets and the widget tree
  2. 2Hot reload, hot restart and the widget inspector
  3. 3Constraints go down, sizes go up
  4. 4Row, Column, Stack, Expanded and Padding
  5. 5SafeArea, MediaQuery and LayoutBuilder
  6. 6StatefulWidget and setState
  7. 7ListView.builder, GridView and images
  8. 8Form, TextFormField and validation
  9. 9Material 3 theming and dark mode
  10. 10Material and Cupertino on both platformsOptional

Start with

  • GuideFree
    Flutter Documentation

    Google

    Do the first Flutter app codelab, then the layout, constraints and lists pages

Practise

  • Use a free challenge's mobile design image as the spec for a native screen

Keep handy

Before moving on: Rebuild three screens from a real app you use (a login, a list with images and a detail page) so they adapt to a small and a large phone and support dark mode.

Tauseef's advice
Read the page on how constraints work ("constraints go down, sizes go up") and most overflow errors disappear. Do the first-app codelab, then rebuild real screens instead of more tutorials.

Mark this stage as not done?