AnimatedItemBuilder typedef
Signature for the builder callback used by AnimatedList, AnimatedList.separated & AnimatedGrid to build their animated children.
This signature is also used by AnimatedList.separated to build its separators and to animate their exit transition after their corresponding item has been removed.
The context
argument is the build context where the widget will be
created, the index
is the index of the item to be built, and the
animation
is an Animation that should be used to animate an entry
transition for the widget that is built.
For AnimatedList.separated, the index
is the index
of the corresponding item of the separator that is built or removed.
For AnimatedList.separated removedSeparatorBuilder
, the animation
should be used
to animate an exit transition for the widget that is built.
See also:
- AnimatedRemovedItemBuilder, a builder that is for removing items with animations instead of adding them.
Implementation
typedef AnimatedItemBuilder = Widget Function(BuildContext context, int index, Animation<double> animation);