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.
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.
- exprollable_page_view
A PageView widget that expands or shrinks its pages dynamically while scrolling vertically.
57Compare - sliver_sticky_collapsable_panel
A Sliver implementation of a sticky collapsible panel with a box header and sliver child.
57Compare - sticky_and_expandable_list
Grouped list with sticky headers and expandable sections for CustomScrollView
50Compare - expandable_sliver_list
A sliver list widget that can be expanded or collapsed to show or hide its contents.
49Compare