sliver_snap library
This library provides a widget that allows you to create a custom sliver app bar with snapping and scrolling effects and animations.
-
To use this library, import
package:sliver_snap/sliver_snap.dart
. -
Then use the SliverSnap widget as the body of your Scaffold and provide the
expandedContent
,collapsedContent
and thebody
widgets as arguments.
- The
expandedContent
is the widget that will be shown when the sliver app bar is fully expanded. - The
collapsedContent
is the widget that will be shown when the sliver app bar is fully collapsed. - The
body
is the widget that will be scrolled below the sliver app bar.
See the example directory for a complete sample app that demonstrates how to use the SliverSnap widget.
Classes
- CollapsedAppBarContent
- Widget which is shown when the SliverSnap is collapsed.
- ExpandedContent
- Widget which is shown when the SliverSnap is expanded.
- SliverSnap
- SnappingAppBarBody
- SnappingScrollNotificationHandler
Typedefs
- CollapsingStateCallback = void Function(bool isCollapsed, double scrollingOffset, double maxExtent)