declarative_animated_list 0.2.0 copy "declarative_animated_list: ^0.2.0" to clipboard
declarative_animated_list: ^0.2.0 copied to clipboard

An implementation of animated list widget that will be automatically updated based on different lists snippets.

Declarative animated list #

An implementation of animated list widget that will be automatically updated based on different lists snippets. Based on Android's DiffUtil with slight changes to support Flutter's declarative UI.


// Create a list tile, wrapped with an animation applying widget
Widget _buildAnimatedTile(Animation<double> animation, PresentationModel model) {
  return FadeTransition(
    opacity: animation,
    child: SizeTransition(
      sizeFactor: animation,
      child: SomeWidget(model),
    ),
  );
}

Widget _buildRemovingTile(final Animation<double> animation, final PresentationModel model) { 
  //... 
}

final declarativeList = DeclarativeList<PresentationModel>(
  items: presentationModels,
  itemBuilder: (ctx, model, index, animation) => _buildAnimatedTile(animation, model),
  removeBuilder: (ctx, model, index, animation) => _buildRemovingTile(animation, model),
);
20
likes
120
pub points
74%
popularity

Publisher

unverified uploader

An implementation of animated list widget that will be automatically updated based on different lists snippets.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (LICENSE)

Dependencies

flutter

More

Packages that depend on declarative_animated_list