transformRotate static method
Implementation
static VillainAnimation transformRotate({
double toAngle = 0.0,
required double fromAngle,
Duration from = Duration.zero,
required Duration to,
Curve curve = Curves.linear,
}) =>
VillainAnimation(
curve: curve,
from: from,
to: to,
animatable: Tween<double>(begin: fromAngle, end: toAngle),
animatedWidgetBuilder: (animation, child) {
return AnimatedBuilder(
animation: animation,
builder: (BuildContext a, Widget? b) {
return Transform.rotate(
angle: animation.value,
child: child,
);
},
);
},
);