lightSpeedOutRight static method
从右侧加速退出动画
Implementation
static AnimatedBuilder lightSpeedOutRight(
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,
);
}