zoomInRight static method

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

从右侧缩放进入动画

Implementation

static ScaleTransition zoomInRight(
  Animation<double> animation,
  Widget child,
) {
  return ScaleTransition(
    scale: Tween<double>(begin: 0.0, end: 1.0).animate(
      CurvedAnimation(parent: animation, curve: Curves.easeInOut),
    ),
    child: SlideTransition(
      position: Tween<Offset>(
        begin: const Offset(1.0, 0.0),
        end: Offset.zero,
      ).animate(
        CurvedAnimation(parent: animation, curve: Curves.easeInOut),
      ),
      child: child,
    ),
  );
}