infinite_paging_widget
A lightweight Flutter infinite scroll list/grid with load-more pagination.
Pass your items and an onLoadMore callback — when the user scrolls near the
bottom, the widget asks for the next page. Supports empty, loading, error,
header, and footer slots out of the box.

Features
- List and grid layouts via
PagingDisplayType - Near-bottom load-more with configurable
loadThreshold - Guards against overlapping load requests
- Empty / loading / error / header / footer slots
- Optional list separators and external
ScrollController - Zero third-party dependencies beyond Flutter
Install
dependencies:
infinite_paging_widget: ^0.1.0
import 'package:infinite_paging_widget/infinite_paging_widget.dart';
Usage
InfinitePagingWidget<String>(
items: items,
hasMore: hasMore,
isLoading: isLoading,
onLoadMore: () => loadNextPage(),
itemBuilder: (context, item, index) {
return ListTile(title: Text(item));
},
)
Grid
InfinitePagingWidget<Product>(
displayType: PagingDisplayType.grid,
gridCrossAxisCount: 2,
gridChildAspectRatio: 0.75,
items: products,
hasMore: hasMore,
isLoading: isLoading,
onLoadMore: loadNextPage,
itemBuilder: (context, product, index) => ProductCard(product: product),
)
Customization
| Parameter | Description |
|---|---|
items |
Current page contents |
itemBuilder |
Builds each row/cell |
onLoadMore |
Called near the bottom when hasMore |
displayType |
PagingDisplayType.list or .grid |
hasMore |
Suppress further loads when false |
isLoading |
External loading flag |
loadThreshold |
Pixels from bottom that trigger load |
loadingWidget |
Initial + bottom loading UI |
emptyWidget |
Shown when items is empty |
errorWidget |
Optional error slot below content |
header / footer |
Slivers above / below the content |
separatorBuilder |
List separators only |
scrollController |
Optional external controller |
Example
See the example/ app for fake pagination in both list and grid
modes.
License
MIT
Libraries
- infinite_paging_widget
- A Flutter infinite scroll list/grid with load-more pagination.