newLatLngBounds static method

dynamic newLatLngBounds(
  1. LatLngBounds bounds,
  2. double padding
)

Returns a camera update that transforms the camera so that the specified geographical bounding box is centered in the map view at the greatest possible zoom level. A non-zero padding insets the bounding box from the map view's edges. The camera's new tilt and bearing will both be 0.0.

Implementation

static newLatLngBounds(LatLngBounds bounds, double padding) {
  if (Platform.isIOS) {
    return appleMaps.CameraUpdate.newLatLngBounds(
        bounds.appleLatLngBounds, padding);
  } else if (Platform.isAndroid) {
    return googleMaps.CameraUpdate.newLatLngBounds(
        bounds.googleLatLngBounds, padding);
  }
}