zoomOut static method

ScaleTransition zoomOut(
  1. Animation<double> animation,
  2. Widget child
)

缩小动画:从大到小

Implementation

static ScaleTransition zoomOut(
  Animation<double> animation,
  Widget child,
) {
  return ScaleTransition(
    scale: Tween<double>(begin: 1.0, end: 0.0).animate(
      CurvedAnimation(parent: animation, curve: Curves.easeIn), // 动画曲线
    ),
    child: FadeTransition(
      opacity: animation,
      child: child,
    ),
  );
}