huge_listview
2.0.12, released 3 years ago by tramontana.co.hu
A performant list view that handles any number of items using a fixed-size cache.
What it does
It provides a ListView replacement capable of handling millions of items by maintaining a fixed-size cache of pages, discarding old pages as new ones are loaded asynchronously. It uses an internal ScrollablePositionedList and a DraggableScrollbar to support item-based scrolling and custom thumbs.
AI-written summary of version 2.0.12, based on the package's README and metadata. Report an inaccuracy
Use it when
- You need to display massive or infinite lists containing hundreds of thousands or millions of items.
- Items have varying heights and you want to maintain high scrolling performance.
- You want to fetch data in pages asynchronously without keeping all items in memory.
Skip it when
- You only need to display a small, fixed list of items where standard Flutter lists suffice.
- You require tight integration with the platform's standard Scrollbar rather than the custom draggable scrollbar.
Strengths
- Handles massive or infinite item counts without memory bloating.
- Supports items with non-uniform heights without performance loss.
- Provides built-in caching via external or internal LRU maps and custom scroll thumbs.
Weaknesses
- Does not play nice with the regular Flutter Scrollbar, requiring its own DraggableScrollbar.
- Requires async page loaders rather than simple synchronous lists.
Setup
- Kind
- Flutter widgets
- Effort
- Low
- Code generation
- No
- Direct dependencies
- 2
HugeListView<MyDataItem>(
pageSize: 12,
pageFuture: (page) => _loadPage(page, 12),
itemBuilder: (context, index, entry) {
return Text(entry.name);
},
)Alternatives
Packages that do the same job and could replace huge_listview.
- indexed_list_view
Infinite ListView that lets you programmatically jump instantly to any item by index.
82Compare - flutter_slidable
Flutter implementation of slidable list item with directional slide actions and dismissal.
97Compare - badges
A Flutter widget to display customizable badges on any widget.
91Compare - infinite_grouped_list
Dynamic scrolling list that efficiently groups items and loads more data as the user scrolls.
79Compare
Works with
Packages commonly used together with huge_listview: ones it builds on, ones built on it, and its own family.