flutter_infinite_scroll_pagination 1.2.0 copy "flutter_infinite_scroll_pagination: ^1.2.0" to clipboard
flutter_infinite_scroll_pagination: ^1.2.0 copied to clipboard

This Flutter package offers effortless infinite scroll loading with just one line of wrapping—no complex setup or controller needed for easy integration.

Introduction #

Experience a whole new level of convenience with just a single line of wrapping—no complex setup or controller required—for effortless infinite scroll loading.

Important

The Scrollable widget (e.g., ListView, GridView) must use a NestedScrollController or a subclass. Using a regular ScrollController will cause the infinite scroll pagination to fail.

Preview #

The GIF below demonstrates the package in action. Please note that due to compression, the animation may appear distorted or choppy.

preview

Why Use This Library? #

This package eliminates the usual boilerplate of infinite scroll implementations. Simply wrap your scrollable widget with InfiniteScrollPagination, and it just works. Perfect for adding infinite scroll to lists, grids, or any scrollable content without worrying about controllers or extra setup.

Usage #

Note

💡 Some beginners mistakenly believe that setting shrinkWrap: true causes a ListView or GridView to build all items at once. This is only partially correct.

In this package, using shrinkWrap does not result in any performance degradation. If you want a more technical and objective explanation of why, please refer to DESCRIPTION.md.

InfiniteScrollPagination(
    reverse: false,
    isEnabled: ...,
    onLoadMore: ...,
    loadingIndicator: ...,
    child: ListView.builder(
        // Set to true in some cases. (Lazy build is still maintained)
        shrinkWrap: true,
        itemCount: _items.length,
        itemBuilder: (context, index) {
            return Text(_items[index]);
        },
    ),
),
2
likes
160
points
133
downloads

Publisher

verified publisherttangkong.dev

Weekly Downloads

This Flutter package offers effortless infinite scroll loading with just one line of wrapping—no complex setup or controller needed for easy integration.

Repository (GitHub)
View/report issues

Documentation

API reference

License

BSD-3-Clause (license)

Dependencies

flutter, flutter_appbar

More

Packages that depend on flutter_infinite_scroll_pagination