Skip to content
pubscout

grouped_scroll_view

0.2.4, released 8 months ago by skyza.org

Display a list of items grouped into a ListView, GridView, or custom scroll view.

WASM-ready
$ flutter pub add grouped_scroll_view
Source repository

What it does

Provides a widget to display a grouped list of items using a provided list and grouper function. It supports sticky headers, custom headers and footers, and built-in checkbox or radio selection functionality within the scroll view.

AI-written summary of version 0.2.4, based on the package's README and metadata. Report an inaccuracy

Use it when

  • You need to display data grouped by a specific property (like year or category).
  • You want to render grouped items as a grid or a list with sticky headers.
  • You need built-in checkbox or radio selection features inside a grouped scroll view.

Skip it when

  • You just need a standard un-grouped ListView or GridView.
  • You require complex state management solutions beyond simple item toggling.

Strengths

  • Supports both list and grid views for grouped data.
  • Includes sticky header, custom header, and custom footer builders.
  • Provides checkbox and radio toggle controller capabilities.

Weaknesses

  • Limited to grouping use cases.
  • Toggle controllers require manual disposal depending on the version flow.

Setup

Kind
Flutter widgets
Effort
Low
Code generation
No
Direct dependencies
2
GroupedScrollView.list(
  groupedOptions: GroupedScrollViewOptions(
    itemGrouper: (Person person) => person.birthYear,
    stickyHeaderBuilder: (BuildContext context, int year, int groupedIndex) => Text('$year'),
  ),
  itemBuilder: (BuildContext context, Person item) => Text(item.name),
  data: DataCache.instance.persons,
)

Alternatives

Packages that do the same job and could replace grouped_scroll_view.

Works with

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