rotateAnimatedRaw method
void
rotateAnimatedRaw(})
Animated rotation of the map. The raw method allows to set all parameters.
Implementation
void rotateAnimatedRaw(
double newRotation, {
required Offset offset,
required Duration duration,
required Curve curve,
required bool hasGesture,
required MapEventSource source,
}) {
// cancel all ongoing animation
_animationController.stop();
_resetAnimations();
if (newRotation == camera.rotation) return;
// create the new animation
_rotationAnimation = Tween<double>(begin: camera.rotation, end: newRotation)
.chain(CurveTween(curve: curve))
.animate(_animationController);
_animationController.duration = duration;
_animationHasGesture = hasGesture;
_animationOffset = offset;
// start the animation from its start
_animationController.forward(from: 0);
}