clamp minZoomLevel

This commit is contained in:
Vadim 2023-06-14 22:15:38 +02:00
parent cc56f7f6de
commit 6eab2ceeee

View file

@ -122,7 +122,7 @@ class CameraContainerBloc extends EvSourceBlocBase<CameraContainerEvent, CameraC
_zoomRange = await Future.wait<double>([
_cameraController!.getMinZoomLevel(),
_cameraController!.getMaxZoomLevel(),
]).then((levels) => RangeValues(levels[0], math.min(_maxZoom, levels[1])));
]).then((levels) => RangeValues(math.max(1.0, levels[0]), math.min(_maxZoom, levels[1])));
_currentZoom = _zoomRange!.start;
_exposureOffsetRange = await Future.wait<double>([