GrowthDirection enum

The direction in which a sliver's contents are ordered, relative to the scroll offset axis.

For example, a vertical alphabetical list that is going AxisDirection.down with a GrowthDirection.forward would have the A at the top and the Z at the bottom, with the A adjacent to the origin, as would such a list going AxisDirection.up with a GrowthDirection.reverse. On the other hand, a vertical alphabetical list that is going AxisDirection.down with a GrowthDirection.reverse would have the Z at the top (at scroll offset zero) and the A below it.

Most scroll views by default are ordered GrowthDirection.forward. Changing the default values of ScrollView.anchor, ScrollView.center, or both, can configure a scroll view for GrowthDirection.reverse.

This sample shows a CustomScrollView, with Radio buttons in the AppBar.bottom that change the AxisDirection to illustrate different configurations. The CustomScrollView.anchor and CustomScrollView.center properties are also set to have the 0 scroll offset positioned in the middle of the viewport, with GrowthDirection.forward and GrowthDirection.reverse illustrated on either side. The sliver that shares the CustomScrollView.center key is positioned at the CustomScrollView.anchor.
link

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

See also:

Inheritance

Constructors

GrowthDirection()
const

Values

forward → const GrowthDirection

This sliver's contents are ordered in the same direction as the AxisDirection. For example, a vertical alphabetical list that is going AxisDirection.down with a GrowthDirection.forward would have the A at the top and the Z at the bottom, with the A adjacent to the origin.

See also:

reverse → const GrowthDirection

This sliver's contents are ordered in the opposite direction of the AxisDirection.

See also:

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<GrowthDirection>
A constant List of the values in this enum, in order of their declaration.