Search packages, repositories and app categories

Package detailsv1.0.7

dyn_mouse_scroll

A wrapper for scrollable widgets that enables smooth scrolling with a mouse on all platforms.

AndroidiOSWebmacOSWindowsLinux
30-day downloads
749
Likes
42
Pub points
145

Install package

flutter pub add dyn_mouse_scroll

Package Overview

Package selection guidance compiled from public package information, community data, and project usage.

dyn_mouse_scroll is a Flutter package that wraps scrollable widgets to enable smooth, consistent mouse scrolling across all platforms, including Android, iOS, Web, macOS, Windows, and Linux. It enhances user experience by providing responsive and fluid scrolling behavior when using a mouse, regardless of the target platform. The package works seamlessly with existing scrollable components like ListView, ScrollViewController, and others without requiring significant code changes. It ensures a native-like scrolling feel on desktop and web environments where mouse input is common.

Use cases

  • Enhancing desktop and web app scroll experiences
  • Improving usability in data-heavy interfaces
  • Enabling smooth scrolling in cross-platform apps
  • Supporting precise mouse navigation in lists and grids
  • Adding consistent scroll behavior across devices

Key features

  • Cross-platform mouse scrolling support
  • Seamless integration with existing scrollable widgets
  • Smooth and responsive scroll performance
  • Minimal configuration required
  • Works with ListView, GridView, and other scrollables

Suitable for

  • Developers building cross-platform apps
  • Apps targeting desktop and web users
  • UIs with long lists or complex scrollable content
  • Teams prioritizing consistent UX across devices

Considerations

  • May require additional testing on mobile devices
  • Limited impact on touch-based scrolling
  • Not needed for apps relying solely on touch input
  • Best suited for applications with frequent mouse interaction
  • Potential performance overhead on very large datasets

Original README

Original README snapshot from the linked source repository. Visit the repository for the latest content.

Dynamic Mouse Scroll

A wrapper for scrollable widgets that enables smooth scrolling with a mouse on all platforms.

First gif: Scrolling slowly.
Second gif: Scrolling quickly (flick scroll).
Third gif: Mobile drag scroll detected, physics change.

Features

  • Animate smooth scroll based on speed of user's scroll.
  • Uses universal_io to detect if platform is mobile or desktop.
  • Automatically detect if the wrong ScrollPhysics is being used and update using provider.
  • Adjust the duration of your scroll events.
  • Choose what mobile physics you would like to use.

Basic Usage

DynMouseScroll(
  builder: (context, controller, physics) => ListView(
    controller: controller,
    physics: physics,
    children: ...
    )
)

Problem:

Flutter does not animate smooth scrolls for pointers, causing choppy experiences for the end user. One package, web_smooth_scroll, attempts to fix this problem by disabling default scrolling entirely (mobile can't drag now) and listening for pointer events to animate the scroll controller that can only move at one speed.

Solution:

To allow mobile default scrolling to still be accessible I detect the user's platform and automatically update if the detection was wrong. When the user scrolls, the 'futurePosition' variable is updated and the animation is started.

Categories

Dependencies

Dependency list 2 items

Source repository

Projects using this package