AxisAlignment class
Alignment along an axis.
Values range from -1.0 (start/left/top) to 1.0 (end/right/bottom).
- Inheritance
-
- Object
- AxisAlignmentGeometry
- AxisAlignment
Constructors
- AxisAlignment(double value)
-
Creates an AxisAlignment.
const
Properties
- direction → TextDirection?
-
The text direction, if any.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- value → double
-
The alignment value.
final
Methods
-
alongValue(
Axis axis, double size) → double - Calculates the position along an axis for a given size.
-
asHorizontalAlignment(
AxisAlignment crossAxisAlignment) → Alignment - Converts this alignment to a standard Alignment with this as the horizontal component.
-
asVerticalAlignment(
AxisAlignment crossAxisAlignment) → Alignment - Converts this alignment to a standard Alignment with this as the vertical component.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
resolve(
TextDirection textDirection) → AxisAlignment -
Resolves the alignment to a concrete AxisAlignment based on the text direction.
override
-
resolveValue(
Axis axis) → double - Resolves the alignment value for a specific axis.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Constants
- center → const AxisAlignment
- Alignment to the center (0.0).
- left → const AxisAlignment
- Alignment to the left (-1.0).
- right → const AxisAlignment
- Alignment to the right (1.0).