AnimationArguments constructor

AnimationArguments(
  1. Animations animation, {
  2. required int delay,
  3. Curve? animationCurve,
  4. DirectionalAnimationDirection? direction,
})

Constructs an AnimationArguments object.

animation specifies the type of animation.

delay is the duration (in milliseconds) to delay the animation.

animationCurve is an optional parameter that specifies the curve used for the animation. If not provided, the default curve is Curves.easeIn.

direction is an optional parameter that specifies the direction of a directional animation. It is required when the animation is Animations.directionalAnimation.

Implementation

AnimationArguments(
  this.animation, {
  required this.delay,
  Curve? animationCurve,
  this.direction,
})  : curve = animationCurve ?? Curves.easeIn,
      assert(
        animation != Animations.directionalAnimation || direction != null,
        'For Animations.directionalAnimation, a direction is required',
      );