animateCamera method

Future<void> animateCamera({
  1. required LatLng latLng,
  2. double? bearing,
  3. Duration duration = const Duration(milliseconds: 1000),
  4. double? zoom,
  5. double? tilt,
})

Implementation

Future<void> animateCamera(
    {required LatLng latLng,
    double? bearing,
    Duration duration = const Duration(milliseconds: 1000),
    double? zoom,
    double? tilt}) async {
  return _methodChannel.invokeMethod(MethodChannelEvent.animateCamera, {
    'latitude': latLng.latitude,
    'longitude': latLng.longitude,
    'bearing': bearing,
    'zoom': zoom,
    'tilt': tilt,
    'duration': duration.inMilliseconds
  });
}