Skip to content
pubscout

automatic_animated_list

1.1.0, released 5 years ago by an unverified publisher

An AnimatedList that automatically computes item deltas and animates list changes.

WASM-ready
$ flutter pub add automatic_animated_list
Source repository

What it does

AutomaticAnimatedList takes an underlying list of items and a keying function, automatically computing the differences using diffutil_dart when the list updates. It then triggers insertion and removal animations for the list tiles without requiring manual AnimatedListState calls.

AI-written summary of version 1.1.0, based on the package's README and metadata. Report an inaccuracy

Use it when

  • You have a dynamic list of items that frequently updates and you want automatic animations.
  • You want to avoid manually managing AnimatedList insertion and removal states.

Skip it when

  • You are not using a list structure that benefits from diff-based animations.
  • You need custom imperative control over every single list animation step.

Strengths

  • Automatically computes item deltas on list updates.
  • Simplifies AnimatedList usage by eliminating manual state manipulation.

Weaknesses

  • Relies on the provided keying function to accurately track items.
  • Limited documentation regarding advanced customization.

Setup

Kind
Flutter widgets
Effort
Low
Code generation
No
Direct dependencies
1
return AutomaticAnimatedList<ItemModel>(
  items: items,
  insertDuration: Duration(seconds: 1),
  removeDuration: Duration(seconds: 1),
  keyingFunction: (ItemModel item) => Key(item.id),
  itemBuilder: (BuildContext context, ItemModel item, Animation<double> animation) {
    return FadeTransition(
      key: Key(item.id),
      opacity: animation,
      child: SizeTransition(
        sizeFactor: animation,
        child: ListTile(title: Text(item.name)),
      ),
    );
  },
);

Alternatives

Packages that do the same job and could replace automatic_animated_list.

Works with

Packages commonly used together with automatic_animated_list: ones it builds on, ones built on it, and its own family.