getRotationAnimation method Null safety

Animation<double> getRotationAnimation(
  1. {required Animation<double> parent}

Animates the rotation of Scaffold.floatingActionButton.

The animation should both start and end with a value of 0.0 or 1.0.

The animation values are a fraction of a full circle, with 0.0 and 1.0 corresponding to 0 and 360 degrees, while 0.5 corresponds to 180 degrees.

For example, to create a rotation animation that rotates the FloatingActionButton through a full circle:

Animation<double> getRotationAnimation({required Animation<double> parent}) {
  return Tween<double>(begin: 0.0, end: 1.0).animate(parent);


Animation<double> getRotationAnimation({ required Animation<double> parent });