GridLayoutDelegate class
A delegate class for a grid layout with two layout modes: auto fill mode and sized mode.
- Inheritance
-
- Object
- MultiChildLayoutDelegate
- GridLayoutDelegate
Constructors
-
GridLayoutDelegate.autoFill({required List<
LayoutId> autoFillItems, required int columnCount, EdgeInsetsGeometry layoutPadding = const EdgeInsets.all(2.0), Size itemPadding = const Size(2.0, 2.0), GridLayoutAlignment lastRowAlignment = GridLayoutAlignment.start}) - Auto fill mode:
-
GridLayoutDelegate.sized({required List<
GridLayoutSizedItem> sizedItems, required int columnCount, EdgeInsetsGeometry layoutPadding = const EdgeInsets.all(2.0), Size itemPadding = const Size(2.0, 2.0), GridLayoutAlignment lastRowAlignment = GridLayoutAlignment.start}) - Sized mode:
Properties
-
autoFillItems
↔ List<
LayoutId> -
List of auto fill items (should be initialized in time)
getter/setter pair
- columnCount ↔ int
-
The number of columns in the grid layout.
getter/setter pair
- hashCode → int
-
The hash code for this object.
no setterinherited
- itemPadding → Size
-
The padding around each item in the layout.
final
-
itemsPosition
↔ List<
Offset> -
Positions of items
getter/setter pair
- lastRowAlignment → GridLayoutAlignment
-
The alignment of the last row in the layout.
final
- layoutPadding → EdgeInsetsGeometry
-
The padding around the entire layout.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
sizedItems
↔ List<
GridLayoutSizedItem> -
List of sized items
getter/setter pair
Methods
-
convertSizedItemByAutoFill(
BoxConstraints constraints) → void -
getSize(
BoxConstraints constraints) → Size -
Override this method to return the size of this object given the
incoming constraints.
override
-
hasChild(
Object childId) → bool -
True if a non-null LayoutChild was provided for the specified id.
inherited
-
layoutChild(
Object childId, BoxConstraints constraints) → Size -
Ask the child to update its layout within the limits specified by
the constraints parameter. The child's size is returned.
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
performLayout(
Size size) → void -
Override this method to lay out and position all children given this
widget's size.
override
-
positionChild(
Object childId, Offset offset) → void -
Specify the child's origin relative to this origin.
inherited
-
shouldRelayout(
covariant MultiChildLayoutDelegate oldDelegate) → bool -
Override this method to return true when the children need to be
laid out.
override
-
toString(
) → String -
Override this method to include additional information in the
debugging data printed by debugDumpRenderTree and friends.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited