initAnimation method

  1. @override
void initAnimation(
  1. AnimationController controller
)
override

Initialize the Animation.

Implementation

@override
void initAnimation(AnimationController controller) {
  _fadeIn = Tween<double>(begin: 0.0, end: 1.0).animate(
    CurvedAnimation(
      parent: controller,
      curve: const Interval(0.0, 0.5, curve: Curves.easeOut),
    ),
  );

  _fadeOut = Tween<double>(begin: 1.0, end: 0.0).animate(
    CurvedAnimation(
      parent: controller,
      curve: const Interval(0.5, 1.0, curve: Curves.easeOut),
    ),
  );

  _scaleIn = Tween<double>(begin: scalingFactor, end: 1.0).animate(
    CurvedAnimation(
      parent: controller,
      curve: const Interval(0.0, 0.5, curve: Curves.easeOut),
    ),
  );
  _scaleOut = Tween<double>(begin: 1.0, end: scalingFactor).animate(
    CurvedAnimation(
      parent: controller,
      curve: const Interval(0.5, 1.0, curve: Curves.easeIn),
    ),
  );
}