FlipAnimation constructor
FlipAnimation({
- Key? key,
- required Duration duration,
- required Duration delay,
- required Widget child,
- ValueSetter<
AnimationController> ? onComplete, - required double begin,
- required double end,
- double idleValue = 0,
Implementation
FlipAnimation({
super.key,
required super.duration,
required super.delay,
required super.child,
super.onComplete,
required double begin,
required double end,
super.idleValue = 0,
}) : super(
builder: (context, value, child) {
final radians = value * pi;
return Transform(
transform: Matrix4.rotationY(radians),
alignment: Alignment.center,
child: child,
);
},
tween: Tween<double>(begin: begin, end: end),
);