onZooming method

void onZooming(
  1. MapZoomDetails details
)

Called whenever zooming is happening.

Subclasses can override this method to do any custom operations based on the details provided in the MapZoomDetails. When super.onZooming(details) is not called, zooming will not happen.

MapZoomDetails contains following properties.

Implementation

void onZooming(MapZoomDetails details) {
  if (_controller != null) {
    _latLngBounds = details.newVisibleBounds;
    if (_controller!.layerType == LayerType.shape) {
      _controller!.notifyZoomingListeners(details);
      _controller!.notifyListeners();
    } else {
      _controller!
        ..isInInteractive = true
        ..gesture = Gesture.scale;
      zoomLevel = details.newZoomLevel!;
      focalLatLng = details.focalLatLng;
      _controller!.notifyListeners();
    }
  }
}