fitBounds method
Implementation
void fitBounds(dynamic bounds, [FitBoundsOptions? options]) {
log('MapStates fitBounds');
LatLngBounds latlngBounds = LatLngBounds.from(bounds);
if (latlngBounds.isNotValid) {
throw Exception('Bounds are not valid');
}
final target =
_getBoundsCenterZoom(latlngBounds, options ?? const FitBoundsOptions());
move(target.center, target.zoom, true);
}