diffutil_sliverlist
0.5.1, released 5 years ago by littlebat.dev
A SliverList that implicitly animates changes using diffutil.
What it does
Provides a SliverList widget that automatically calculates and implicitly animates changes when items are inserted, removed, or updated. It supports both a list of keyed widgets and data objects.
AI-written summary of version 0.5.1, based on the package's README and metadata. Report an inaccuracy
Use it when
- You need an animated SliverList that reacts to list modifications automatically
- You want to animate list items fading, sizing, or shifting using diff calculations
Skip it when
- You are using a standard ListView instead of a Sliver-based list
- You mutate the underlying list directly without creating a new copy for state updates
Strengths
- Supports custom insert and remove animations
- Can build from a list of data items or a list of keyed widgets
Weaknesses
- Requires careful handling of list mutability to allow proper diffing
- Items from data lists must implement equality comparison correctly
Setup
- Kind
- Flutter widgets
- Effort
- Low
- Code generation
- No
- Direct dependencies
- 1
DiffUtilSliverList<int>(
items: list,
builder: (context, item) => Container(
color: colors[item % colors.length],
height: 48,
width: double.infinity,
),
insertAnimationBuilder: (context, animation, child) => FadeTransition(
opacity: animation,
child: child,
),
removeAnimationBuilder: (context, animation, child) => SizeTransition(
sizeFactor: animation,
child: child,
),
)Alternatives
Packages that do the same job and could replace diffutil_sliverlist.
- animated_list_plus
A Flutter ListView that implicitly animates list changes and supports item reordering.
50Compare - implicitly_animated_reorderable_list_2
A Flutter ListView that implicitly animates list changes and supports reordering.
50Compare - anitex
Implicitly animates text changes with smooth transitions
47Compare - implicitly_animated_list
A Flutter widget that implicitly animates a list when it rebuilds with new items.
51Compare
Works with
Packages commonly used together with diffutil_sliverlist: ones it builds on, ones built on it, and its own family.