fitBounds method

  1. @override
void fitBounds(
  1. dynamic bounds, [
  2. FitBoundsOptions? options
])
override

Fits the map bounds. Optional constraints can be defined through the FitBoundsOptions parameter.

can accept center: LatLngBounds([20.0, 30.0, 10, 10]) LatLngBounds(LatLng(20.0, 30.0), LatLng(10.0, 10.0)) or [20.0, 30.0, 10, 10]

Implementation

@override
void fitBounds(dynamic bounds, [FitBoundsOptions? options]) {
  map?.fitBounds(bounds, options);
}