declarative_animated_list
0.2.0, released 3 years ago by an unverified publisher
Animated list widget that updates automatically based on list changes.
What it does
DeclarativeList builds list items with animations that react to changes in the underlying data. It uses a DiffUtil-like algorithm to compute insertions, removals, and moves, applying fade and size transitions.
AI-written summary of version 0.2.0, based on the package's README and metadata. Report an inaccuracy
Use it when
- You need an animated list that updates automatically when the data changes.
- You prefer a declarative approach over manual animation handling.
- You want to customize insertion and removal animations via builders.
Skip it when
- You require extremely high-performance lists with thousands of items.
- You need complex item animations that cannot be expressed with simple FadeTransition and SizeTransition.
Strengths
- Declarative API simplifies list animation logic.
- Built-in diff algorithm reduces boilerplate for insert/remove/move handling.
- Supports custom builders for insertion and removal animations.
Weaknesses
- Limited to list-type widgets; not suitable for grids or other layouts.
- Animation options are basic; complex animations require custom widgets.
Setup
- Kind
- Flutter widgets
- Effort
- Low
- Code generation
- No
- Direct dependencies
- 0
final declarativeList = DeclarativeList<PresentationModel>(
items: presentationModels,
itemBuilder: (ctx, model, index, animation) => FadeTransition(
opacity: animation,
child: SizeTransition(
sizeFactor: animation,
child: SomeWidget(model),
),
),
removeBuilder: (ctx, model, index, animation) => _buildRemovingTile(animation, model),
);Alternatives
Packages that do the same job and could replace declarative_animated_list.
- country_picker
A Flutter widget to pick a country from a list with optional phone code and search.
78Compare - infinite_calendar_view
Easily build your different views of your calendar with this package. Month, week, multi days, one day, list ... and many features of the calendar widget.
74Compare - dropdown_flutter
Customizable dropdown with search, multi‑select, and built‑in validation
72Compare - flutter_reorderable_list
Reorderable list for Flutter supporting slivers and large items
50Compare