direction property
final
The direction in which the user is scrolling.
This does not represent the current AxisDirection or GrowthDirection of the Viewport, which respectively represent the direction that the scroll offset is increasing in, and the direction that contents are being laid out in.
This sample shows a CustomScrollView, with Radio buttons in the
AppBar.bottom that change the AxisDirection to illustrate different
configurations. With a NotificationListener to listen to
UserScrollNotifications, which occur when the ScrollDirection changes
or stops.
link
To create a local project with this code sample, run:
flutter create --sample=rendering.ScrollDirection.1 mysample
Implementation
final ScrollDirection direction;