Ad

Flutter Desktop Scrolling With Mouse Wheel: Step Size

How do i change how much a single mouse scroll wheel step scrolls in a Flutter Desktop App (Windows, macOS, Linux), without affecting touchpad scrolling speed?

The default scroll wheel step size is too small, especially on 4K monitors.

If i multiply the step size through scroll listener, it breaks touchpad scrolling, makes it too fast.

I maybe need to somehow distinguish between touchpad scroll and mousewheel scroll?

Ad

Answer

Currently there is no reliable way to distinguish between scroll wheel scroll and trackpad scroll because they are the same event at the engine level. Because trackpad gestures aren't directly supported yet trackpad scroll is currently implemented as a series of discrete incremental scroll events rather than a gesture.

Once that issue is addressed, they will be different types of scrolling that can be distinguished from each other.

Ad
source: stackoverflow.com
Ad