BoxAlignmentContentStretch class

Stretch alignment that makes items fill available space.

BoxAlignmentContentStretch implements the "stretch" alignment behavior where flex items expand to fill the cross-axis dimension of their container. This is commonly used to make all items in a row have equal height, or all items in a column have equal width.

Items are positioned at offset 0, and the stretching is handled by adjusting their size rather than their position.

Inheritance

Constructors

BoxAlignmentContentStretch()
Creates a stretch alignment instance.
const

Properties

hashCode int
The hash code for this object.
no setteroverride
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

adjustSize({required ParentLayout parent, required LayoutAxis axis, required double viewportSize, required double contentSize, required double childSize}) double?
Adjusts the size to the maximum of child size and content size.
override
adjustSpacing({required ParentLayout parent, required LayoutAxis axis, required double viewportSize, required double contentSize, required double startSpacing, required double spacing, required double endSpacing, required int affectedCount}) → ({double additionalEndSpacing, double additionalSpacing, double additionalStartSpacing})?
Adjusts spacing between items when distributing space.
inherited
align({required ParentLayout parent, required LayoutAxis axis, required double viewportSize, required double contentSize, required double maxBaseline, required double childBaseline}) double
For stretch alignment, items are positioned at the start (offset 0). The stretching is handled by adjustSize rather than position offset.
override
needsBaseline({required ParentLayout parent, required LayoutAxis axis}) bool
Stretch alignment doesn't require baseline information.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
override

Operators

operator ==(Object other) bool
The equality operator.
override