smooth_scroll_web 0.0.4
smooth_scroll_web: ^0.0.4 copied to clipboard

Flutter Web package for a smoother scroll experience. Can be used with any scrollable widget, but only on desktop browsers.

smooth_scroll_web #

A simple package, that helps the feel of the Scrollable widgets.

About me #

You can find out everything about the creation of this package, how it works by opening this link. https://hobbister.com/2020/11/17/smooth-scrolling-with-flutter-web/ It would be very appriciated.

Getting started #

The package should only be used for Flutter Web and on the desktop version of the site, while the mobile version of Flutter is doing a really good job of scrolling, with really great performance, It cannot be said for the mouse wheel scrolling.

You can use the package with any Scrollable widget, but you have to set its physics to NeverScrollableScrollPhysics(), because it is the only way to deactivate the default scrolling and we need complete control over the scrolling.

Without and With SmoothScrollWeb #

smoothless smooth

Bluring is due to the movement and the gif's poor quality.

Example #

@override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text("SmoothScroll Example"),
      ),
      body: SmoothScrollWeb(
        child: _getChild(),
        controller: controller,
      ),
    );
  }

  Widget _getChild() {
    return Container(
      height: 1000,
      child: ListView(
        physics: NeverScrollableScrollPhysics(),
        controller: controller,
        children: [
          for (int i = 0; i < 100; i++)
            Container(
              height: 60,
              color: RandomColor.generate(),
            ),
        ],
      ),
    );
  }

38
likes
100
pub points
82%
popularity

Flutter Web package for a smoother scroll experience. Can be used with any scrollable widget, but only on desktop browsers.

Repository (GitLab)
View/report issues

Documentation

API reference

License

unknown (LICENSE)

Dependencies

flutter

More

Packages that depend on smooth_scroll_web