jackInTheBox static method
盒子跳动动画
Implementation
static ScaleTransition jackInTheBox(
Animation<double> animation,
Widget child,
) {
return ScaleTransition(
scale: Tween<double>(begin: 0.1, end: 1.0).animate(
CurvedAnimation(
parent: animation,
curve: const Interval(0.0, 0.5, curve: Curves.bounceOut),
),
),
child: RotationTransition(
turns: Tween<double>(begin: 0.25, end: 0.0).animate(
CurvedAnimation(
parent: animation,
curve: const Interval(0.5, 1.0, curve: Curves.bounceOut),
),
),
child: child,
),
);
}