Skip to content
pubscout

expandable_sliver_list

4.1.1, released 4 years ago by tylernorbury.com

A sliver list widget that can be expanded or collapsed to show or hide its contents.

WASM-ready
$ flutter pub add expandable_sliver_list
Source repository

What it does

Provides a custom sliver list widget that users can expand and collapse dynamically using a controller. It supports adding, removing, and setting items programmatically.

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

Use it when

  • You need a collapsible sliver list inside a CustomScrollView
  • You want programmatic control over expanding, collapsing, and modifying list items

Skip it when

  • You are not using slivers or CustomScrollView
  • You need complex nested expandable trees rather than a flat list

Strengths

  • Easy integration with CustomScrollView via slivers
  • Handy controller for managing items, expanding, and collapsing

Weaknesses

  • Limited to a flat list structure
  • No built-in search or advanced filtering features

Setup

Kind
Flutter widgets
Effort
Low
Code generation
No
Direct dependencies
0
ExpandableSliverList<int>(
  initialItems: [1, 2, 3],
  controller: ExpandableSliverListController(),
  builder: (context, item, index) {
    return ListTile(title: Text(item.toString()));
  },
)

Alternatives

Packages that do the same job and could replace expandable_sliver_list.