sliver_tools
0.2.12, released 3 years ago by pietervanloon.com
Utility sliver widgets missing from the Flutter framework
What it does
sliver_tools provides a collection of sliver widgets such as MultiSliver, SliverStack, SliverClip, SliverAnimatedPaintExtent, and SliverCrossAxisConstrained. These widgets simplify common scroll view patterns like grouping multiple slivers, stacking decorations, clipping overlapping content, and animating size changes. They are designed to work seamlessly with CustomScrollView and other sliver-based layouts.
AI-written summary of version 0.2.12, based on the package's README and metadata. Report an inaccuracy
Use it when
- Building complex scroll views with multiple slivers
- Need sticky headers or pinned slivers
- Want to stack decorations or boxes over slivers
- Require animated size changes when list content changes
Skip it when
- Simple lists or grids that can use ListView or GridView
- Projects that already use a comprehensive UI kit with sliver support
- When you need a full layout framework beyond slivers
Strengths
- Easy grouping of multiple slivers with MultiSliver
- Stacking and clipping utilities for decorative effects
- Built‑in animation helpers for smooth size transitions
- Null‑safe, fully documented, and actively maintained
Weaknesses
- Limited to sliver‑based layouts only
- No support for non‑sliver widgets beyond simple boxes
- Requires understanding of sliver mechanics
Setup
- Kind
- Flutter widgets
- Effort
- Low
- Code generation
- No
- Direct dependencies
- 0
```dart
CustomScrollView(
slivers: [
MultiSliver(
children: [
SliverPersistentHeader(
pinned: true,
delegate: MyHeaderDelegate(),
),
SliverList(
delegate: SliverChildBuilderDelegate(
(context, index) => ListTile(title: Text('Item ${index + 1}')),
childCount: 20,
),
),
],
),
],
);
```Alternatives
Packages that do the same job and could replace sliver_tools.
- constrained_scrollable_views
Composable scrollable views that constrain size to parent constraints
44Compare
Works with
Packages commonly used together with sliver_tools: ones it builds on, ones built on it, and its own family.
- infinite_scroll_paginationBuilt on sliver_toolsLazily load and display pages of items as the user scrolls down your screen.
- grouped_scroll_viewBuilt on sliver_toolsDisplay a list of items grouped into a ListView, GridView, or custom scroll view.
- debug_overlayBuilt on sliver_toolsAdds a configurable debug overlay with tools like logs, media query info, and theme overrides.