pagination_view
2.0.0, released 5 years ago by vedartm.com
Provides a ready‑made widget to paginate lists or grids with built‑in loading, error and empty states.
What it does
PaginationView handles fetching pages of data, displaying them in a ListView or GridView, and shows loaders, headers, footers, and error widgets. It integrates with bloc for state management and supports pull‑to‑refresh and custom scroll controllers.
AI-written summary of version 2.0.0, based on the package's README and metadata. Report an inaccuracy
Use it when
- You need infinite scrolling or paginated lists without writing boilerplate code.
- You already use bloc or flutter_bloc for state management.
Skip it when
- You prefer a pure provider/riverpod solution without bloc.
- You need highly custom pagination logic not covered by the widget.
Strengths
- Simple API for common pagination patterns
- Built‑in support for headers, footers, loaders and error handling
- Works with both ListView and GridView
- Integrates with bloc for state handling
Weaknesses
- Tightly coupled to bloc, limiting use with other state‑management approaches
- Limited customization beyond provided callbacks
- Breaking changes in major versions may require code updates
Setup
- Kind
- Flutter widgets
- Effort
- Low
- Code generation
- No
- Direct dependencies
- 2
PaginationView<User>(
preloadedItems: [User('Alice','alice@example.com')],
itemBuilder: (ctx, user, idx) => ListTile(title: Text(user.name), subtitle: Text(user.email)),
pageFetch: (page) async => [],
);Alternatives
Packages that do the same job and could replace pagination_view.
- flutter_slidable
Flutter implementation of slidable list item with directional slide actions and dismissal.
97Compare - indexed_list_view
Infinite ListView that lets you programmatically jump instantly to any item by index.
82Compare - infinite_grouped_list
Dynamic scrolling list that efficiently groups items and loads more data as the user scrolls.
79Compare - animated_reorderable
Animated, draggable reorderable ListView/GridView with built‑in swipe‑to‑delete.
73Compare
Works with
Packages commonly used together with pagination_view: ones it builds on, ones built on it, and its own family.