sliver_snap
2.1.1, released a year ago by bytebakery.xx.kg
Provides collapsible and expandable app bars with automatic snapping behaviors.
What it does
Simplifies the integration of collapsible and expandable app bars in Flutter scroll views. It offers smooth transitions responding to user scrolling and automatically snaps to the appropriate mode when scrolling stops midway.
AI-written summary of version 2.1.1, based on the package's README and metadata. Report an inaccuracy
Use it when
- You need custom collapsible and expandable app bars with smooth scrolling transitions.
- You want automatic snapping behavior when a user stops scrolling midway through expanding or collapsing.
Skip it when
- You only need standard Material SliverAppBar without custom expansion or snap animations.
- You are not using Flutter.
Strengths
- Offers smooth transitions and automatic snapping to collapsed or expanded modes.
- Highly customizable with properties like custom backgrounds, scroll controllers, and animation curves.
- Includes helper components for collapsed and expanded app bar contents.
Weaknesses
- Limited to sliver and app bar use cases.
- Depends on flutter_hooks.
Setup
- Kind
- Flutter widgets
- Effort
- Low
- Code generation
- No
- Direct dependencies
- 1
Add the dependency to pubspec.yaml and import the package.
SliverSnap(
expandedContentHeight: 400,
expandedContent: const Center(child: Text('Expanded')),
collapsedContent: const Text('Collapsed'),
body: const Placeholder(),
)Alternatives
Packages that do the same job and could replace sliver_snap.
- sliver_app_bar_builder
Customizable sliver app bar using builder callbacks.
74Compare - scrollable_tab_view
A vertical scrollable tab bar widget for Flutter layouts.
60Compare - expandable
A Flutter widget that expands or collapses content with optional header and icon.
50Compare - accordion
An expandable and collapsible accordion list widget for Flutter.
50Compare
Works with
Packages commonly used together with sliver_snap: ones it builds on, ones built on it, and its own family.