scale static method

Widget scale(
  1. Animation<double> animation,
  2. Animation<double> secondaryAnimation,
  3. Widget child
)

Scale animation, from in to out (ScaleTransition)

Implementation

static Widget scale(
  Animation<double> animation,
  Animation<double> secondaryAnimation,
  Widget child,
) {
  return FadeTransition(
    opacity: animation,
    child: ScaleTransition(
      scale: Tween<double>(
        begin: 0.7,
        end: 1,
      ).animate(
        CurvedAnimation(parent: animation, curve: Curves.ease),
      ),
      child: child,
    ),
  );
}