direction property

ScrollDirection direction

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.

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


final ScrollDirection direction;