Skip to content
pubscout

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.

WASM-ready
$ flutter pub add huge_listview
Source repository

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.

Works with

Packages commonly used together with huge_listview: ones it builds on, ones built on it, and its own family.