StacCrossAxisAlignment enum
Cross-axis alignment options for flex layouts.
Defines how children are aligned along the cross axis in flex layouts
such as Row
and Column
widgets. The cross axis is perpendicular to
the main axis:
- In a
Row
, the cross axis is vertical (top to bottom) - In a
Column
, the cross axis is horizontal (left to right)
These values adapt to text direction for start
and end
alignments.
Values
- start → const StacCrossAxisAlignment
-
Align children to the start of the cross axis.
In a
Row
: aligns to the top In aColumn
: aligns to the start edge (left in LTR, right in RTL) - end → const StacCrossAxisAlignment
-
Align children to the end of the cross axis.
In a
Row
: aligns to the bottom In aColumn
: aligns to the end edge (right in LTR, left in RTL) - center → const StacCrossAxisAlignment
-
Center children along the cross axis.
- stretch → const StacCrossAxisAlignment
-
Stretch children to fill the cross axis.
Children will be sized to match the cross axis dimension of their parent.
- baseline → const StacCrossAxisAlignment
-
Align children along their text baseline.
Only applicable to widgets that have a text baseline. If a child doesn't have a baseline, it will be aligned using start instead.
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- index → int
-
A numeric identifier for the enumerated value.
no setterinherited
- name → String
-
Available on Enum, provided by the EnumName extension
The name of the enum value.no setter - 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
Constants
-
values
→ const List<
StacCrossAxisAlignment> - A constant List of the values in this enum, in order of their declaration.