setZoom method

void setZoom(
  1. double zoom
)

Sets the zoom level of the globe.

The zoom parameter specifies the new zoom level of the globe.

Example usage:

FlutterEarthGlobeController controller = FlutterEarthGlobeController();
controller.setZoom(2);

Implementation

void setZoom(double zoom) {
  assert(zoom >= minZoom && zoom <= maxZoom);
  if (zoom < minZoom) {
    zoom = minZoom;
  } else if (zoom > maxZoom) {
    zoom = maxZoom;
  } else {
    this.zoom = zoom;
  }
  notifyListeners();
}