flipOutY static method
沿 Y 轴翻出动画
Implementation
static AnimatedBuilder flipOutY(
Animation<double> animation,
Widget child,
) {
return AnimatedBuilder(
animation: animation,
builder: (context, child) {
final angle = math.pi * animation.value;
return Transform(
alignment: Alignment.center,
transform: Matrix4.rotationY(angle)..scale(1.0 - animation.value),
child: Opacity(opacity: 1.0 - animation.value, child: child),
);
},
child: child,
);
}