Layout & Rendering
From widgets to pixels
Section titled “From widgets to pixels”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.
What this module covers
Section titled “What this module covers”| Lesson | What you’ll learn |
|---|---|
| Constraints & layout | The one rule: constraints go down, sizes go up, parent sets position |
| Core layout widgets | Row/Column/Flex, Expanded, Stack, Container, and friends |
| Slivers & scrolling | Lazy building, ListView, CustomScrollView, and slivers |
| The render pipeline | Build, layout, paint, composite — what happens each frame |
The one idea to hold
Section titled “The one idea to hold”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"]
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.