onWillZoom property
Called whenever zooming is happening.
If it returns false, zooming will not happen.
MapZoomDetails contains following properties.
- MapZoomDetails.previousVisibleBounds - provides the visible bounds before the current zooming operation completes i.e. current visible bounds.
- MapZoomDetails.newVisibleBounds - provides the new visible bounds when the current zoom completes. Hence, if it returns false, there will be no changes in the UI.
- MapZoomDetails.previousZoomLevel - provides the zoom level before the current zooming operation completes i.e. current zoom level.
- MapZoomDetails.newZoomLevel - provides the new zoom level when the current zoom completes. Hence, if it returns false, there will be no changes in the UI.
- MapZoomDetails.globalFocalPoint - The global focal point of the pointers in contact with the screen.
- MapZoomDetails.localFocalPoint - The local focal point of the pointers in contact with the screen.
Implementation
final WillZoomCallback? onWillZoom;