simple_grouped_listview
4.0.0, released 5 months ago by quentin.klein.onl
Displays a list or grid of items grouped by a header.
WASM-ready
What it does
Provides widgets to render a collection of items grouped by a computed header. Supports ListView, GridView and custom builders, with optional sorting within groups.
AI-written summary of version 4.0.0, based on the package's README and metadata. Report an inaccuracy
Use it when
- You need to show a simple grouped list or grid without writing grouping logic yourself
- You want customizable header and item builders for each group
- You need to integrate a third‑party sticky‑header widget
Skip it when
- You require advanced virtualization for very large data sets
- You need built‑in pagination or infinite scrolling
- You need complex state‑management or data‑layer integration
Strengths
- Very easy to integrate – just add the dependency and use the widget
- Supports both list and grid layouts with custom header/item builders
- Allows optional sorting of items within each group
Weaknesses
- Limited to basic grouping – no built‑in pagination or lazy loading
- No built‑in scroll‑to‑header functionality
- Breaking API changes between major versions may require code updates
Setup
- Kind
- Flutter widgets
- Effort
- Low
- Code generation
- No
- Direct dependencies
- 1
GroupedListView.list(
items: List<int>.generate(100, (i) => i + 1),
itemGrouper: (int i) => i.isEven,
headerBuilder: (context, isEven, count) => Container(
color: Colors.amber,
padding: EdgeInsets.all(16),
child: Text(isEven ? 'Even' : 'Odd', style: TextStyle(fontWeight: FontWeight.bold)),
),
listItemBuilder: (context, groupCount, indexInGroup, item, originalIndex) =>
Padding(padding: EdgeInsets.all(8), child: Text(item.toString())),
);Alternatives
Packages that do the same job and could replace simple_grouped_listview.
- grouped_scroll_view
Display a list of items grouped into a ListView, GridView, or custom scroll view.
57Compare - flutter_slidable
Flutter implementation of slidable list item with directional slide actions and dismissal.
97Compare - alphabet_list_view
A ListView with sticky headers and an iOS-like clickable sidebar.
76Compare - grouped_list
A Flutter ListView widget where list items can be grouped into sections.
50Compare