transformable_list_view
0.8.0, released 10 months ago by tbrgroup.software
Widget that adds scroll‑based transform animations to ListView and SliverList
What it does
Extends ListView and SliverList with a callback that returns a Matrix4 for each child based on its scroll position. The callback receives detailed item metrics to create custom animations.
AI-written summary of version 0.8.0, based on the package's README and metadata. Report an inaccuracy
Use it when
- You need per‑item scroll animations in a list
- You want a simple API without external dependencies
- You prefer declarative widget composition
Skip it when
- You need complex physics‑based animations beyond simple transforms
- You require state‑management or dependency injection
- You are building a non‑Flutter platform
Strengths
- Zero external dependencies
- Supports both ListView and SliverList
- Provides detailed item metrics for fine‑grained control
- Compatible with all Flutter platforms
Weaknesses
- Only supports transform animations, not other animation types
- Requires manual Matrix4 math
- No built‑in presets for common effects
- No state‑management integration
Setup
- Kind
- Flutter widgets
- Effort
- Low
- Code generation
- No
- Direct dependencies
- 0
Add dependency to pubspec and import the widget
TransformableListView.builder(
getTransformMatrix: (item) {
final progress = item.visibleExtent / item.size.height;
final scale = 0.3 + (0.7 * progress);
return Matrix4.identity()
..translate(item.size.width / 2)
..scale(scale)
..translate(-item.size.width / 2);
},
itemBuilder: (ctx, i) => Container(height: 100, color: i.isEven ? Colors.grey : Colors.blue),
itemCount: 30,
);Alternatives
Packages that do the same job and could replace transformable_list_view.
- animated_vector
Add vector-based animations with a data format inspired by composable widgets.
72Compare - animation_list
A simple animation listview widget that shows list items by sliding and bouncing.
50Compare - animated_digit
A Flutter widget for scroll-animated numbers and digits.
68Compare - animated_to
Animates its child widget to a new position automatically when its position changes requiring no calculation.
77Compare