Package selection guidance compiled from public package information, community data, and project usage.
A customizable pagination package for Flutter that enables efficient loading and display of data from APIs in a page-by-page manner. It supports both pull-to-refresh and infinite scroll interactions, making it ideal for list-based applications with large datasets. The package is designed to be flexible, allowing developers to customize the UI, loading indicators, and error states. It integrates seamlessly with async data fetching and handles edge cases like empty results and network failures.
Use cases
Loading large datasets in lists
Implementing infinite scroll
Fetching data from REST APIs
Displaying paginated search results
Building news or social media feeds
Key features
Customizable UI components
Pull-to-refresh support
Infinite scroll integration
Error and empty state handling
Configurable loading indicators
Suitable for
Apps with extensive data lists
API-driven content displays
User interfaces requiring lazy loading
Developers seeking reusable pagination logic
Projects needing responsive pagination UX
Considerations
Requires manual API request handling
Limited built-in caching
Not optimized for very high-frequency updates
Depends on external state management
May need additional styling for complex layouts
Original README
Original README snapshot from the linked source repository. Visit the repository for the latest content.
Flutter Paginator
A customizable pagination package for Flutter. This package can be used
to fetch and display data from an API page by page.
Screenshots
Installing
dependencies:flutter_paginator:^0.0.6
Description
Paginator extends StatefulWidget has 3 constructors namely Paginator.listView, Paginator.gridView and Paginator.pageView. Paginator.listView, Paginator.gridView and Paginator.pageView are descendants of ListView, GridView and PageView. Paginator.listView, Paginator.gridView and Paginator.pageView got all the features of their ancestors and they are need to provide additional functions that are essential in doing their task.
PageLoadFuture
Loads the page asynchronously when the page number is given.
This should return an instance of a Future.
Called when the next page is needed to be loaded.
PageItemsGetter
This function should return list of page item data when page data is given.
This is called after successful completion of PageLoadFuture.
The page items returned by this method is added to the list of all the
page items.
ListItemBuilder
Builds list item when item data and item index are given.
This should return an instance of a Widget.
LoadingWidgetBuilder
Builds loading widget.
This should return an instance of a Widget.
ErrorWidgetBuilder
Builds error widget when page data and error callback are given.
This should return an instance of a Widget.
EmptyListWidgetBuilder
Builds empty list widget.
This is displayed when the total number of list items is zero.
This should return an instance of a Widget.
TotalItemsGetter
This should return total number of list items when page data is given.
PageErrorChecker
This should return true if page has error else false, when page data is given.