zoomOutRight static method
缩小右移动画
Implementation
static AnimatedBuilder zoomOutRight(
Animation<double> animation,
Widget child,
) {
return AnimatedBuilder(
animation: animation,
builder: (context, child) {
double offset = 300.0 * (1.0 - animation.value);
return Transform.translate(
offset: Offset(offset, 0),
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,
);
}