Skip to content

Layout & Rendering

You describe a UI as a tree of widgets. Flutter’s job is to turn that description into positioned, painted pixels — and it does it with one small, learnable algorithm. Master that algorithm and layout stops being trial-and-error.

LessonWhat you’ll learn
Constraints & layoutThe one rule: constraints go down, sizes go up, parent sets position
Core layout widgetsRow/Column/Flex, Expanded, Stack, Container, and friends
Slivers & scrollingLazy building, ListView, CustomScrollView, and slivers
The render pipelineBuild, layout, paint, composite — what happens each frame

Almost every layout question in Flutter is answered by a single sentence you will meet in the next lesson:

flowchart TB
  p["Parent"] -->|1. passes constraints down| c["Child"]
  c -->|2. picks a size within them| p
  p -->|3. sets child position| done["Positioned + sized"]
The layout conversation between parent and child

A parent hands its child a set of constraints (min/max width and height). The child chooses its size within those limits. The parent then decides where to put the child. That three-step conversation, repeated down the tree, is the whole layout system.

What is Flutter's layout system, in one sentence?
When a layout will not do what you want, what are you usually fighting?
Who decides where a child is positioned?