flip static method
翻转动画
Implementation
static AnimatedBuilder flip(
Animation<double> animation,
Widget child,
) {
return AnimatedBuilder(
animation: animation,
builder: (context, child) {
final angle = animation.value * math.pi;
return Transform(
alignment: Alignment.center,
transform: Matrix4.rotationY(angle),
child: child,
);
},
child: child,
);
}