animateRotation method

Widget animateRotation({
  1. Key? key,
  2. double turns = 0.0,
  3. Duration duration = const Duration(milliseconds: 400),
  4. Curve curve = MotionCurves.swiftOut,
})

Wraps a widget in a rotation effect

Implementation

Widget animateRotation({
  Key? key,
  double turns = 0.0,
  Duration duration = const Duration(milliseconds: 400),
  Curve curve = MotionCurves.swiftOut,
}) {
  return AnimatedRotation(
    key: key,
    turns: turns,
    duration: duration,
    curve: curve,
    child: this,
  );
}