isScrollingNotifier property

ValueNotifier<bool> isScrollingNotifier
finalinherited

This notifier's value is true if a scroll is underway and false if the scroll position is idle.

Listeners added by stateful widgets should be removed in the widget's State.dispose method.

{@tool dartpad} This sample shows how you can trigger an auto-scroll, which aligns the last partially visible fixed-height list item, by listening to this notifier's value. This sort of thing can also be done by listening for ScrollEndNotifications with a NotificationListener. An alternative example is provided with ScrollEndNotification.

** See code in examples/api/lib/widgets/scroll_position/is_scrolling_listener.0.dart ** {@end-tool}

Implementation

final ValueNotifier<bool> isScrollingNotifier = ValueNotifier<bool>(false);