wheelMotion property

WheelMotion? wheelMotion
final

How the view moves on mouse wheel input.

Defaults to WheelMotion.spring(): the view animates to where a notch points, and notches during the motion add to its target. The scrollbars follow it on every frame. Pass null to move at once on every notch instead.

wheelMotion: const WheelMotion.spring(
  duration: Duration(milliseconds: 250),
),
wheelMotion: null, // no animation

Only the wheel is animated: trackpad scrolling, dragging a scrollbar, and the jump that keeps a Node in place on a scale change, or on a theme change of the row height, row spacing or top content padding, move the view at once, and stop a motion in progress. A change of rows above the view during a motion, such as an expand or a collapse, keeps the rows in view still and the motion going: it settles where it was heading, moved by the rows added or removed, within the list's ends. One that comes with such a scale or theme change keeps the rows in view still and stops the motion. A wheel turned over a scrollbar moves the view as it does over the rows, and adds to the same target.

How far a notch travels is not set here; that is app-wide, through SmoothWheelBinding in flutter_smooth_wheel_scroll.

Implementation

final WheelMotion? wheelMotion;