getRotationAnimation method

  1. @override
Animation<double> getRotationAnimation({
  1. Animation<double>? parent,
})
override

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:

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

Implementation

@override
Animation<double> getRotationAnimation({Animation<double>? parent}) {
  return Tween<double>(begin: 1.0, end: 1.0).animate(parent!);
}