rotateOutUpLeft static method
左上角旋转退出动画
Implementation
static AnimatedBuilder rotateOutUpLeft(
Animation<double> animation,
Widget child,
) {
return AnimatedBuilder(
animation: animation,
child: child,
builder: (context, child) {
final angle = -animation.value * pi / 2;
final offset = animation.value * 200;
return Transform(
transform: Matrix4.rotationZ(angle)..translate(0.0, -offset),
alignment: Alignment.topLeft,
child: FadeTransition(
opacity: animation,
child: child,
),
);
},
);
}