rotateIn method
Rotation animation
Implementation
Widget rotateIn({
Duration duration = const Duration(milliseconds: 300),
double beginAngle = 0.0,
double endAngle = 1.0,
}) {
return TweenAnimationBuilder<double>(
tween: Tween(begin: beginAngle, end: endAngle),
duration: duration,
builder: (context, value, child) {
return Transform.rotate(
angle: value * 3.14159265359, // Convert to radians
child: child,
);
},
child: this,
);
}