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.

This sample shows a CustomScrollView, with Radio buttons in the AppBar.bottom that change the AxisDirection to illustrate different configurations.
link

To create a local project with this code sample, run:
flutter create --sample=painting.AxisDirection.1 mysample

See also:

Inheritance

Constructors

AxisDirection()
const

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.

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