rotated method

Widget rotated(
  1. double degree, [
  2. Duration duration = const Duration(milliseconds: 300)
])

Rotates this widget by degree degrees. Animate if degree changes.

Implementation

Widget rotated(
  double degree, [
  Duration duration = const Duration(milliseconds: 300),
]) {
  return AnimatedRotation(
    turns: degree / 360,
    duration: duration,
    child: this,
  );
}