From 77cf06d598494e6360ced1ee0dec0161f8f5880f Mon Sep 17 00:00:00 2001 From: urusai88 Date: Sat, 19 Nov 2022 21:10:14 +0300 Subject: [PATCH] Ignore case where `details.scale == 0` (#1388) --- lib/src/gestures/gestures.dart | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/src/gestures/gestures.dart b/lib/src/gestures/gestures.dart index 727933f77..3023fc714 100644 --- a/lib/src/gestures/gestures.dart +++ b/lib/src/gestures/gestures.dart @@ -387,7 +387,9 @@ abstract class MapGestureMixin extends State var mapRotated = false; if (hasMove || hasZoom) { double newZoom; - if (hasZoom) { + // checking details.scale to prevent situation whew details comes + // with zero scale + if (hasZoom && details.scale > 0.0) { newZoom = _getZoomForScale( _mapZoomStart, details.scale + _scaleCorrector);