Skip to content
pubscout

declarative_animated_list

0.2.0, released 3 years ago by an unverified publisher

Animated list widget that updates automatically based on list changes.

WASM-ready
$ flutter pub add declarative_animated_list
Source repository

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.