cupertino_listview
3.0.0, released 2 years ago by davidgonzalez-freelance.fr
iOS‑style sectioned list view with sticky headers
What it does
CupertinoListView renders a vertical list of sections, each with a header that stays pinned while scrolling. It supports dynamic and static children, empty sections, and custom separators.
AI-written summary of version 3.0.0, based on the package's README and metadata. Report an inaccuracy
Use it when
- Building an iOS‑styled list with sticky section headers
- Need a simple API similar to ListView.builder for grouped data
- Want to display empty sections with only a header
- Integrating with scroll_to_index for programmatic scrolling
Skip it when
- You only need a plain ListView without sticky headers
- You require Android‑style Material design list views
- You need complex custom section widgets beyond the provided builder
Strengths
- Sticky headers out of the box
- Supports empty sections
- Flexible builder API for dynamic/static content
- Compatible with all Flutter platforms
Weaknesses
- Only provides Cupertino (iOS) styling
- No built‑in Material design alternative
- Limited to sectioned lists, not arbitrary grids or carousels
Setup
- Kind
- Flutter widgets
- Effort
- Low
- Code generation
- No
- Direct dependencies
- 0
CupertinoListView.builder(
sectionCount: data.length,
itemInSectionCount: (s) => data[s].items.length,
sectionBuilder: (ctx, path, _) => Text(data[path.section].name),
childBuilder: (ctx, idx) => Text(data[idx.section].items[idx.child]),
separatorBuilder: (ctx, idx) => Divider(indent: 20.0),
controller: _scrollController,
);Alternatives
Packages that do the same job and could replace cupertino_listview.
- flutter_slidable
Flutter implementation of slidable list item with directional slide actions and dismissal.
97Compare - grouped_list
A Flutter ListView widget where list items can be grouped into sections.
50Compare - sticky_grouped_list
A scrollable list where items are grouped into sections with sticky headers.
50Compare - country_picker
A Flutter widget to pick a country from a list with optional phone code and search.
78Compare