AnimatableWrapper constructor

const AnimatableWrapper(
  1. Widget child, {
  2. int? animationIndex,
  3. int? indexToShowAt,
  4. AnimationArguments? animationArguments,
  5. Key? key,
})

Constructs an AnimatableWrapper widget.

child is the widget to be wrapped and potentially animated.

animationIndex is the optional index at which the animation should start.

indexToShowAt is the optional index at which the child should become visible. This is required if animationIndex is set.

animationArguments is the optional animation arguments for the child animation.

Implementation

const AnimatableWrapper(
  this.child, {
  this.animationIndex,
  this.indexToShowAt,
  this.animationArguments,
  super.key,
}) : assert(
        !(animationIndex != null && indexToShowAt == null),
        'If animationIndex is set, indexToShowAt also needs to be specified',
      );