Search packages, repositories and app categories

Package detailsv2.3.0

implicitly_animated_list

A Flutter widget that implicitly animates a list whenever it rebuilds with new items.

AndroidiOSmacOSWindowsLinux
30-day downloads
22.6K
Likes
33
Pub points
150

Install package

flutter pub add implicitly_animated_list

Package Overview

Package selection guidance compiled from public package information, community data, and project usage.

A Flutter widget that automatically animates list items when the list rebuilds with new data, eliminating the need for manual animation management. It handles insertions, deletions, and updates smoothly using implicit animations, making it ideal for dynamic lists like chat interfaces or task boards. The widget integrates seamlessly with standard Flutter lists and requires minimal setup. It supports all major platforms and is designed for simplicity and performance.

Use cases

  • Dynamic list updates
  • Chat UIs with message arrivals
  • Task list management
  • Real-time data feeds
  • Animated item transitions

Key features

  • Automatic insertion animations
  • Smooth deletion transitions
  • Built-in update handling
  • Minimal boilerplate
  • Cross-platform support

Suitable for

  • Developers seeking simple list animations
  • Apps with frequently updated lists
  • UIs requiring visual feedback on changes
  • Beginners learning Flutter animations
  • Projects prioritizing developer efficiency

Considerations

  • Limited customization over animation curves
  • Not ideal for complex custom animations
  • May impact performance with very large lists
  • Requires careful state management to avoid flickering
  • Best suited for moderate-sized datasets

Original README

Original README snapshot from the linked source repository. Visit the repository for the latest content.

Often, your lists represent some kind of data.

You can just pass the original list data to the ImplicitlyAnimatedList as well as an itemBuilder for building a widget from one data point, and it'll animate whenever the data changes:

ImplicitlyAnimatedList(
  // When you change items of this list and hot reload, the list animates.
  itemData: [1, 2, 3, 4],
  itemBuilder: (_, number) => ListTile(title: Text('$number')),
),

It works with all classes and works well with StreamBuilder:

class User {
  const User({required this.firstName, required this.lastName});

  final String firstName;
  final String lastName;

  // The ImplicitlyAnimatedList uses the == operator to compare items.
  bool operator ==(Object other) => other is User
    && firstName == other.firstName
    && lastName == other.lastName;
}

...

StreamBuilder<List<User>>(
  stream: someSource.usersStream,
  builder: (context, snapshot) {
    if (!snapshot.hasData) {
      return ...;
    }
    return ImplicitlyAnimatedList(
      itemData: snapshot.data,
      itemBuilder: (context, user) {
        return ListTile(title: Text('${user.firstName} ${user.lastName}'));
      }
    );
  }
)

Here's an example that generates random numbers and animates from one state to the next (notice it's only 10 fps because of being a GIF):

example showcase

In addition to ImplicitlyAnimatedList, there's also SliverImplicitlyAnimatedList for use in a CustomScrollView:

CustomScrollView(
  slivers: [
    SliverImplicitlyAnimatedList(
      itemData: myListOfItems,
      itemBuilder: (context, item) => ListTile(title: Text('$item')),
    ),
    // ...
  ],
),

Categories

Dependencies

Dependency list 1 items

  • list_diff^2.0.0

Source repository

Projects using this package