FitGridLayoutDelegate class
Делегат, который рассчитывает раскладку во время layout-фазы.
Это позволяет избегать rebuild при изменении размеров окна: при ресайзе происходит relayout, а дерево виджетов остаётся неизменным.
- Inheritance
-
- Object
- MultiChildLayoutDelegate
- FitGridLayoutDelegate
Constructors
-
FitGridLayoutDelegate({required int itemCount, required int maxItems, required Size itemPadding, required Alignment alignment, required EdgeInsets gridPadding, double? aspectRatio, List<
TileSizePreset> presets = tileSizePresets})
Properties
- alignment → Alignment
-
final
- aspectRatio → double?
-
final
- gridPadding → EdgeInsets
-
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- itemCount → int
-
final
- itemPadding → Size
-
final
- maxItems → int
-
final
-
presets
→ List<
TileSizePreset> -
Список пресетов размеров плитки, из которых выбирается оптимальный.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
getSize(
BoxConstraints constraints) → Size -
Override this method to return the size of this object given the
incoming constraints.
inherited
-
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 FitGridLayoutDelegate 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