Skip to content
pubscout

sliver_expandable

1.1.2, released 2 years ago by an unverified publisher

A Sliver Flutter widget that expands or collapses another child Sliver widget.

WASM-ready
$ flutter pub add sliver_expandable
Source repository

What it does

Sliver Expandable allows developers to add expand and collapse functionality to any Sliver in Flutter. It supports headers and animated transitions when toggling the expanded state.

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

Use it when

  • You need collapsible sections inside a CustomScrollView
  • You want to build expandable lists using slivers

Skip it when

  • You are not using CustomScrollView or slivers in your layout
  • You only need standard non-sliver expansion panels

Strengths

  • Works natively with Flutter slivers and CustomScrollView
  • Includes support for animated expansion and headers

Weaknesses

  • Limited to sliver-based layouts

Setup

Kind
Flutter widgets
Effort
Low
Code generation
No
Direct dependencies
0
AnimatedSliverExpandable(
  expanded: _expanded,
  headerBuilder: (context, animation) => ListTile(
    onTap: () => setState(() => _expanded = !_expanded),
    title: const Text('Expandable'),
  ),
  sliver: SliverList(
    delegate: SliverChildBuilderDelegate(
      (context, index) => ListTile(title: Text('Item $index')),
      childCount: 5,
    ),
  ),
)

Alternatives

Packages that do the same job and could replace sliver_expandable.