ui/layout library

Classes

Align
A widget that aligns its child within itself.
AlignElement
An element that manages an Align widget.
Alignment
Represents a relative alignment in 2D space.
BoxConstraints
Immutable box layout constraints.
BuildContext
A handle to a location in the widget tree.
Center
A widget that centers its child within itself.
Column
A layout widget that arranges its children vertically.
ColumnElement
An element that manages a Column widget.
ConstrainedBox
A widget that imposes BoxConstraints on its child.
ConstrainedBoxElement
An element that manages a ConstrainedBox widget.
Constraint
Abstract base class for all layout constraints.
EdgeInsets
An immutable set of offsets in each of the four cardinal directions in terminal space.
Element
Instantiated element in the widget tree that keeps track of widget updates and state.
ElementWidget
A bridge widget that maintains a persistent Element tree for its child.
Expanded
An Expanded widget forces its child to consume all remaining space in a Row or Column.
FlexConstraint
A proportional flexible space constraint.
Flexible
Controls how a child widget of a Row or Column scales.
FlexibleElement
An element that manages a Flexible widget.
GlobalKey<T extends State<StatefulWidget>>
A key that is unique across the entire element tree. Global keys allow widgets to be uniquely identified and retrieved from the registry.
InheritedElement
An element that manages an InheritedWidget.
InheritedWidget
A widget that propagates information down the tree.
Key
A unique identifier for Widget configurations.
LeafElement
Default element for leaf widgets that do not build children.
LengthConstraint
A fixed length layout constraint.
MinMaxConstraint
A constraint with min and max bounds.
PercentageConstraint
A percentage-based layout constraint relative to parent size.
Positioned
Places a widget inside a Stack at specific coordinate offsets.
PositionedElement
An element that manages a Positioned widget.
Rect
A 2D rectangle representing bounds in terminal space.
Row
A layout widget that arranges its children horizontally.
RowElement
An element that manages a Row widget.
SizedBox
A widget that imposes tight constraints on its child.
SizedBoxElement
An element that manages a SizedBox widget.
Stack
A layout widget that stacks its children on top of each other.
StackElement
An element that manages a Stack widget.
State<T extends StatefulWidget>
The logic and internal state for a StatefulWidget.
StatefulElement
An element that manages a StatefulWidget and its State.
StatefulWidget
A widget that has mutable state.
StatelessElement
An element that manages a StatelessWidget.
StatelessWidget
A widget that has configuration but delegates rendering to its built child.
Viewport
A Viewport wraps a parent buffer, translating and clipping drawing operations to a relative local coordinate space within bounds.
Widget
Abstract base class for all renderable widgets.

Enums

LayoutDirection
Layout direction for box splitting.

Functions

splitRect(Rect area, List<Constraint> constraints, LayoutDirection direction) List<Rect>
Splits a Rect area into multiple sub-rectangles according to layout constraints.

Typedefs

VoidCallback = void Function()
Signature for callbacks that take no arguments and return no data.