A standalone set of layout algorithms, operating on LayoutItem items.
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
box(
{required Iterable< LayoutItem> items, required LayoutConstraints constraints, required double? targetWidth, required double? targetHeight, required EdgeInsets padding, required Anchor? alignment}) → Vector2 -
Sizes a region to
targetWidth/targetHeight- or to its largest item pluspaddingwhere either is null - then places every item inside it atalignment. -
crossAxisOffset(
CrossAxisAlignment alignment, double freeSpace) → double -
The cross-axis offset for
freeSpace, peralignment. -
distributeSpace(
MainAxisAlignment alignment, double freeSpace, int count) → (double, double) -
The leading gap and the gap between each pair of adjacent items, for
freeSpacedistributed acrosscountitems peralignment. -
flex(
{required Axis direction, required LayoutConstraints constraints, required Iterable< LayoutItem> items, required MainAxisAlignment mainAxisAlignment, required CrossAxisAlignment crossAxisAlignment, required MainAxisSize mainAxisSize, required double spacing}) → Vector2 - Measures non-flex items, distributes remaining main-axis space to flex items, then positions everyone in exactly three passes.
-
place(
LayoutItem item, Vector2 position) → void -
Positions
itemso its content's top-left corner lands atposition, honoringitem's own anchor and scale.