onWillPan property
Called whenever panning is happening.
If it returns false, panning will not happen.
MapPanDetails contains following properties.
- MapPanDetails.previousVisibleBounds - provides the visible bounds before the current panning operation completes i.e. current visible bounds.
- MapPanDetails.newVisibleBounds - provides the new visible bounds when the current pan completes. Hence, if it returns false, there will be no changes in the UI.
- MapPanDetails.zoomLevel - provides the current zoom level.
- MapPanDetails.delta - The difference in pixels between touch start and current touch position.
- MapPanDetails.globalFocalPoint - The global focal point of the pointers in contact with the screen.
- MapPanDetails.localFocalPoint - The local focal point of the pointers in contact with the screen.
Implementation
final WillPanCallback? onWillPan;