FlutterBasic6 topics

Layout and scrolling

Use constraints, flexible space, stacks, lists and grids to build predictable screens.

This chapter covers layout and scrolling through specific problems and worked examples. Read the lesson descriptions before choosing a starting point. Complete runnable examples are labelled; project configuration and code fragments explain where they belong.

Your lessons

One clear step at a time
  1. 01Layout starts with constraintsUnderstand how parent constraints, child sizes and Expanded work together in a Flutter layout.2 min
  2. 02Adapt a screen to the space it hasUse LayoutBuilder to choose a practical layout without assuming every device has the same screen width.2 min
  3. 03Flutter Stack and Positioned for layered interfacesLayer content deliberately, choose a bounded parent and avoid using absolute positioning for an entire responsive screen.2 min
  4. 04Flutter ListView.builder and efficient scrolling listsBuild visible list items on demand, keep state out of temporary row instances and provide stable item identities.2 min
  5. 05Flutter GridView versus Wrap: collections and flowing controlsChoose a scrollable grid for many items and Wrap for a small collection that should flow onto new lines.2 min
  6. 06Flutter scrolling: one viewport and composable sliversCombine a header and a long list in one CustomScrollView, and avoid accidental unbounded nested scrolling.2 min
View the full Flutter course

Find your next idea

Search lessons, code examples and projects.

Type a few words to start exploring.