ScrollDirection enum Null safety

The direction of a scroll, relative to the positive scroll offset axis given by an AxisDirection and a GrowthDirection.

This contrasts to GrowthDirection in that it has a third value, idle, for the case where no scroll is occurring.

This is used by RenderSliverFloatingPersistentHeader to only expand when the user is scrolling in the same direction as the detected scroll offset change.

Inheritance

Constructors

ScrollDirection()
const

Values

idle → const ScrollDirection

No scrolling is underway.

ScrollDirection()
forward → const ScrollDirection

Scrolling is happening in the positive scroll offset direction.

For example, for the GrowthDirection.forward part of a vertical AxisDirection.down list, this means the content is moving up, exposing lower content.

ScrollDirection()
reverse → const ScrollDirection

Scrolling is happening in the negative scroll offset direction.

For example, for the GrowthDirection.forward part of a vertical AxisDirection.down list, this means the content is moving down, exposing earlier content.

ScrollDirection()

Properties

hashCode int
The hash code for this object.
read-onlyinherited
index int
A numeric identifier for the enumerated value.
read-onlyinherited
runtimeType Type
A representation of the runtime type of the object.
read-onlyinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent 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<ScrollDirection>
A constant List of the values in this enum, in order of their declaration.
[idle, forward, reverse]