animate method

AnimatedValues animate(
  1. AnimationController controller
)

Creates animations from this config using the given controller.

Implementation

AnimatedValues animate(AnimationController controller) {
  final curvedAnimation = CurvedAnimation(parent: controller, curve: curve);

  return AnimatedValues(
    fade:
        Tween<double>(begin: fadeFrom, end: fadeTo).animate(curvedAnimation),
    scale: Tween<double>(begin: scaleFrom, end: scaleTo)
        .animate(curvedAnimation),
    slide: Tween<Offset>(begin: slideFrom, end: slideTo)
        .animate(curvedAnimation),
  );
}