AxisDirection enum
A direction along either the horizontal or vertical Axis in which the origin, or zero position, is determined.
This value relates to the direction in which the scroll offset increases from the origin. This value does not represent the direction of user input that may be modifying the scroll offset, such as from a drag. For the active scrolling direction, see ScrollDirection.
To create a local project with this code sample, run:
flutter create --sample=painting.AxisDirection.1 mysample
See also:
- ScrollDirection, the direction of active scrolling, relative to the positive scroll offset axis given by an AxisDirection and a GrowthDirection.
- GrowthDirection, the direction in which slivers and their content are ordered, relative to the scroll offset axis as specified by AxisDirection.
- CustomScrollView.anchor, the relative position of the zero scroll offset in a viewport and inflection point for AxisDirections of the same cardinal Axis.
- axisDirectionIsReversed, which returns whether traveling along the given axis direction visits coordinates along that axis in numerically decreasing order.
Values
- up → const AxisDirection
-
A direction in the Axis.vertical where zero is at the bottom and positive values are above it:
⇈
Alphabetical content with a GrowthDirection.forward would have the A at the bottom and the Z at the top.
For example, the behavior of a ListView with ListView.reverse set to true would have this axis direction.
See also:
- axisDirectionIsReversed, which returns whether traveling along the given axis direction visits coordinates along that axis in numerically decreasing order.
- right → const AxisDirection
-
A direction in the Axis.horizontal where zero is on the left and positive values are to the right of it:
⇉
Alphabetical content with a GrowthDirection.forward would have the A on the left and the Z on the right. This is the ordinary reading order for a horizontal set of tabs in an English application, for example.
For example, the behavior of a ListView with ListView.scrollDirection set to Axis.horizontal would have this axis direction.
See also:
- axisDirectionIsReversed, which returns whether traveling along the given axis direction visits coordinates along that axis in numerically decreasing order.
- down → const AxisDirection
-
A direction in the Axis.vertical where zero is at the top and positive values are below it:
⇊
Alphabetical content with a GrowthDirection.forward would have the A at the top and the Z at the bottom. This is the ordinary reading order for a vertical list.
For example, the default behavior of a ListView would have this axis direction.
See also:
- axisDirectionIsReversed, which returns whether traveling along the given axis direction visits coordinates along that axis in numerically decreasing order.
- left → const AxisDirection
-
A direction in the Axis.horizontal where zero is to the right and positive values are to the left of it:
⇇
Alphabetical content with a GrowthDirection.forward would have the A at the right and the Z at the left. This is the ordinary reading order for a horizontal set of tabs in a Hebrew application, for example.
For example, the behavior of a ListView with ListView.scrollDirection set to Axis.horizontal and ListView.reverse set to true would have this axis direction.
See also:
- axisDirectionIsReversed, which returns whether traveling along the given axis direction visits coordinates along that axis in numerically decreasing order.
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<
AxisDirection> - A constant List of the values in this enum, in order of their declaration.