LayoutData class final

Data structure containing all layout properties for a child element.

LayoutData encapsulates sizing constraints, positioning information, flex properties, and alignment settings that control how a child is laid out within its parent container.

This class is immutable and used throughout the layout system to communicate layout requirements between widgets and layout algorithms.

Constructors

LayoutData.new({LayoutBehavior behavior = LayoutBehavior.none, double flexGrow = 0.0, double flexShrink = 0.0, int? paintOrder, SizeUnit? width = SizeUnit.fitContent, SizeUnit? height = SizeUnit.fitContent, SizeUnit? minWidth, SizeUnit? maxWidth, SizeUnit? minHeight, SizeUnit? maxHeight, PositionUnit? top, PositionUnit? left, PositionUnit? right, PositionUnit? bottom, double? aspectRatio, BoxAlignmentGeometry? alignSelf})
Creates layout data with the specified properties.

Properties

alignSelf BoxAlignmentGeometry?
The cross-axis alignment override for this specific child.
final
aspectRatio double?
The aspect ratio constraint (width/height).
final
behavior LayoutBehavior
The layout behavior for this child (normal flow or absolute positioning).
final
bottom PositionUnit?
The bottom offset for absolute positioning.
final
flexGrow double
The flex grow factor for flexible sizing.
final
flexShrink double
The flex shrink factor for flexible sizing.
final
hashCode int
The hash code for this object.
no setteroverride
height SizeUnit?
The explicit height of this child.
final
left PositionUnit?
The left offset for absolute positioning.
final
maxHeight SizeUnit?
The maximum height constraint.
final
maxWidth SizeUnit?
The maximum width constraint.
final
minHeight SizeUnit?
The minimum height constraint.
final
minWidth SizeUnit?
The minimum width constraint.
final
paintOrder int?
The paint order for controlling drawing sequence.
final
The right offset for absolute positioning.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
top PositionUnit?
The top offset for absolute positioning.
final
width SizeUnit?
The explicit width of this child.
final

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.
override