infinite_paging_widget 0.1.0 copy "infinite_paging_widget: ^0.1.0" to clipboard
infinite_paging_widget: ^0.1.0 copied to clipboard

A Flutter infinite scroll list/grid with load-more pagination. Supports empty, loading, error, header, and footer slots.

infinite_paging_widget #

CI pub package

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.

Demo

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

0
likes
160
points
88
downloads
screenshot

Documentation

API reference

Publisher

verified publisherayushd70.dev

Weekly Downloads

A Flutter infinite scroll list/grid with load-more pagination. Supports empty, loading, error, header, and footer slots.

Repository (GitHub)
View/report issues

Topics

#ui #list #pagination #infinite-scroll #widget

License

MIT (license)

Dependencies

flutter

More

Packages that depend on infinite_paging_widget