zoomOutDown static method
缩小下移动画
Implementation
static AnimatedBuilder zoomOutDown(
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,
);
}