smooth_list_view 1.1.1 copy "smooth_list_view: ^1.1.1" to clipboard
smooth_list_view: ^1.1.1 copied to clipboard

ListView constructors that implement smooth scrolling when using a mouse and scrolling with arrow keys.

A flutter plugin to implement smooth scrolling on desktop and web.

Comparison #

Without #

without the package

With #

with the package

Features #

  • Like the standard ListView but better
  • Scroll smoothly no matter what platform you're using (web, desktop, mobile)
  • Scroll through CustomListViews using the directional keys on your keyboard
  • Support scroll switching between mouse and trackpad

Constructors #

  • SmoothListView(...) : behave exactly like a classic ListView(...) except that it makes scrolling with a mouse wheel smoother.
  • SmoothListView.builder(...) : behave exactly like a classic ListView.builder(...) except that it makes scrolling with a mouse wheel smoother.
  • SmoothListView.adapative(...) : behave exactly like a classic ListView(...) except that it allows you to easily switch between smooth scroll and classic scroll.
  • SmoothListView.adaptiveBuilder(...) : behave exactly like a classic ListView.builder(...) except that it allows you to easily switch between smooth scroll and classic scroll.

Getting started #

First, add the package to your pubspec.yaml :

flutter pub add smooth_list_view

Then import it inside your Dart code :

import 'package:smooth_list_view/smooth_list_view.dart';

Usage #

Import the package :

import 'package:smooth_list_view/smooth_list_view.dart';

ListView #

Replace :

// ...
@override
Widget build(BuildContext context) {
    return ListView(...);
}
// ...

With :

// ...
@override
Widget build(BuildContext context) {
    // You can keep the exact same parameters
    return SmoothListView(...);
}
// ...

ListView.builder() #

Replace :

// ...
@override
Widget build(BuildContext context) {
    return ListView.builder(...);
}
// ...

With :

// ...
@override
Widget build(BuildContext context) {
    // You can keep the exact same parameters
    return SmoothListView.builder(...);
}
// ...

ListView.separated() #

Replace :

// ...
@override
Widget build(BuildContext context) {
    return ListView.separated(...);
}
// ...

With :

// ...
@override
Widget build(BuildContext context) {
    // You can keep the exact same parameters
    return SmoothListView.separated(...);
}
// ...

ListView.custom() #

Replace :

// ...
@override
Widget build(BuildContext context) {
    return ListView.custom(...);
}
// ...

With :

// ...
@override
Widget build(BuildContext context) {
    // You can keep the exact same parameters
    return SmoothListView.custom(...);
}
// ...

Additional information #

Feel free to check the Example panel for a richer implementation.

If you encounter any issue feel free to open one on GitHub :)

25
likes
150
points
273
downloads
screenshot

Publisher

unverified uploader

Weekly Downloads

ListView constructors that implement smooth scrolling when using a mouse and scrolling with arrow keys.

Repository (GitHub)
View/report issues

Topics

#animation #ui #widget #web

Documentation

API reference

License

BSD-3-Clause (license)

Dependencies

flutter

More

Packages that depend on smooth_list_view