growthDirection property

GrowthDirection growthDirection
final

The direction in which the contents of slivers are ordered, relative to the axisDirection.

For example, if the axisDirection is AxisDirection.up, and the growthDirection is GrowthDirection.forward, then an alphabetical list will have A at the bottom, then B, then C, and so forth, with Z at the top, with the bottom of the A at scroll offset zero, and the top of the Z at the highest scroll offset.

On the other hand, if the axisDirection is AxisDirection.up but the growthDirection is GrowthDirection.reverse, then an alphabetical list will have A at the top, then B, then C, and so forth, with Z at the bottom, with the bottom of the Z at scroll offset zero, and the top of the A at the highest scroll offset.

If a viewport has an overall AxisDirection of AxisDirection.down, then slivers above the absolute zero offset will have an axis of AxisDirection.up and a growth direction of GrowthDirection.reverse, while slivers below the absolute zero offset will have the same axis direction as the viewport and a growth direction of GrowthDirection.forward. (The slivers with a reverse growth direction still see only positive scroll offsets; the scroll offsets are reversed as well, with zero at the absolute zero point, and positive numbers going away from there.)

In general, lists grow only in the positive scroll offset direction, so the only growth direction that is commonly seen is GrowthDirection.forward.

Implementation

final GrowthDirection growthDirection