Skip to main content

easeTo

Future<void> easeTo ({required Map<String, dynamic> center, double? zoom, double? bearing, double? pitch, double? duration, bool? animate, Map<String, dynamic>? padding})

Ease the camera to the target location

Implementation

Future<void> easeTo({
required Map<String, dynamic> center,
double? zoom,
double? bearing,
double? pitch,
double? duration,
bool? animate,
Map<String, dynamic>? padding,
}) async {
Map<String, dynamic> easeToOptions = {"center": center};
if (zoom != null) {
easeToOptions['zoom'] = zoom!;
}
if (padding != null) {
easeToOptions['padding'] = padding!;
}
if (bearing != null) {
easeToOptions['bearing'] = bearing!;
}
if (pitch != null) {
easeToOptions['pitch'] = pitch!;
}
if (duration != null) {
easeToOptions['duration'] = duration!;
}
if (animate != null) {
easeToOptions['animate'] = animate!;
}
return _channel.invokeMethod('easeTo', {"easeToOptions": easeToOptions});
}