animateCamera method

Future<void> animateCamera(
  1. CameraUpdate cameraUpdate, {
  2. Duration? duration,
})

Starts an animated change of the map camera position.

The duration parameter specifies the duration of the animation. If null, the platform will decide the default value.

The returned Future completes after the change has been started on the platform side.

Implementation

Future<void> animateCamera(CameraUpdate cameraUpdate, {Duration? duration}) {
  return GoogleMapsFlutterPlatform.instance.animateCameraWithConfiguration(
      cameraUpdate, CameraUpdateAnimationConfiguration(duration: duration),
      mapId: mapId);
}