infinite_widgets
2.0.2, released 4 years ago by jaumard.com
Widgets for infinite scrolling lists and grids
WASM-ready
What it does
Provides InfiniteListView and InfiniteGridView that load more data when scrolled near the end. They mimic the API of ListView and GridView with added hasNext and nextData callbacks.
AI-written summary of version 2.0.2, based on the package's README and metadata. Report an inaccuracy
Use it when
- You need to display a large list or grid that loads data lazily from a network or database
- You want a simple, drop‑in replacement for ListView/GridView with pagination support
Skip it when
- Your list is small and static
- You need complex scroll behaviors not supported by the widget
Strengths
- Easy to use, same API as standard ListView/GridView
- Null safety and Flutter 3 compatible
- Handles scroll controller internally
- Supports custom loading widgets
Weaknesses
- Limited to list and grid layouts only
- No support for custom scroll thresholds beyond a single value
- No advanced features like pull‑to‑refresh or error handling
Setup
- Kind
- Flutter widgets
- Effort
- Low
- Code generation
- No
- Direct dependencies
- 0
InfiniteListView.separated(
itemBuilder: (context, index) => Text('$index'),
itemCount: _data.length,
hasNext: _data.length < 200,
nextData: loadNextData,
separatorBuilder: (context, index) => Divider(height: 1),
);Alternatives
Packages that do the same job and could replace infinite_widgets.
- responsive_grid
Responsive grid system for Flutter with row/column, list, and staggered list widgets
50Compare - country_picker
A Flutter widget to pick a country from a list with optional phone code and search.
78Compare - reorderable_grid
Reorderable grid widget with drag‑and‑drop support
67Compare - flutter_reorderable_list
Reorderable list for Flutter supporting slivers and large items
50Compare