lightSpeedOutLeft static method
从左侧加速退出动画
Implementation
static AnimatedBuilder lightSpeedOutLeft(
Animation<double> animation,
Widget child,
) {
return AnimatedBuilder(
animation: animation,
builder: (context, child) {
final double translateX = -animation.value * 400;
final double opacity = 1.0 - animation.value;
return Transform.translate(
offset: Offset(translateX, 0),
child: Opacity(opacity: opacity, child: child),
);
},
child: child,
);
}