zoomOutUp static method

AnimatedBuilder zoomOutUp(
  1. Animation<double> animation,
  2. Widget child
)

缩小上移动画

Implementation

static AnimatedBuilder zoomOutUp(
  Animation<double> animation,
  Widget child,
) {
  return AnimatedBuilder(
    animation: animation,
    builder: (context, child) {
      double offset = -100.0 * (1.0 - animation.value);
      return Transform.translate(
        offset: Offset(0, offset),
        child: ScaleTransition(
          scale: Tween<double>(begin: 1.0, end: 0.0).animate(
            CurvedAnimation(parent: animation, curve: Curves.easeIn),
          ),
          child: FadeTransition(
            opacity: animation,
            child: child,
          ),
        ),
      );
    },
    child: child,
  );
}