sliver_expandable
v1.1.2A Sliver Flutter widget that can be used to expand or collapse another child Sliver widget
Архив пакета: https://pubdev.letsnova.ru/api/archives/sliver_expandable/1.1.2.tar.gz
Установка
dart pub add sliver_expandableREADME
Sliver Expandable
Sliver Expandable lets expand and collapse any Sliver in Flutter.
Getting started
- Add it to your
pubspec.yaml:
sliver_expandable: ^1.1.0
- Use it:
AnimatedSliverExpandable(
expanded: _expanded,
headerBuilder: (context, animation) => ListTile(
onTap: () => setState(() => _expanded = !_expanded),
tileColor: Colors.amber,
title: const Text('Expandable'),
trailing: AnimatedBuilder(
animation: animation,
builder: (context, child) => Transform.rotate(
angle: (animation.value - 0.5) * pi,
child: child,
),
child: const Icon(Icons.chevron_left),
),
),
sliver: SliverList(
delegate: SliverChildBuilderDelegate(
(context, index) => ListTile(
title: Text('Expandable item no. $index'),
),
childCount: 5,
),
),
),
История изменений
1.1.2
- Fix collapsed maxPaintExtent
- Dispose animations in AnimatedSliverExpandable
- Upgrade to Flutter 3.27
1.1.1
- Fix hasVisualOverflow
- Remove unused platform directories
1.1.0
- Move creation of CurvedAnimation to didUpdateWidget
- Add sticky header case to example
- Fix usage without header
- Fix translationOffset not passed to SliverExpandable by AnimatedSliverExpandable
1.0.0
- Ability to use without a header
- Breaking Changes:
AnimatedSliverExpandableno longer performs toggling the state and instead a boolean value forexpandedshould be providedSliverExpandableHeaderBuildersignature changed to drop theonTogglecallback
0.0.1
- Initial release
