Layout & Structure
Last updated
The Layout System is the structural framework of your application. It defines how widgets are arranged, aligned, and positioned on the screen. Understanding these core concepts is crucial for building responsive and adaptive interfaces.
Before diving into individual widgets, understand the three main layout models:
Box Model (Container & Sized Box): Every widget is a box. You can control its size, padding, and margins.
Flex Layout (Row & Column): The most common way to arrange widgets linearly (horizontally or vertically).
Stack Layout (Stack & Overlay): Positioning widgets on top of each other, useful for background images or floating badges.
Below are the specific widgets used to implement these concepts:
Container - A versatile box with styling, padding, and dimensions.
Sized Box - precise control over spacing and fixed dimensions.
Row & Column - The workhorses of layout; arrange children in a line.
Wrap - Like a row/column, but wraps to the next line when space runs out.
Stack - Place widgets on top of each other (z-axis).
Overlay - Float content above the entire application.
Last updated