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 jumps that keep a Node in place on expand, collapse or a scale change move the view at once, and stop a motion in progress. A wheel turned over a scrollbar moves it at once too.

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

Implementation

final WheelMotion? wheelMotion;