From 82f4c9af9f9117f62710810dae0c410e9ad3c158 Mon Sep 17 00:00:00 2001 From: otsmr Date: Fri, 26 Dec 2025 08:20:42 +0100 Subject: [PATCH] fix #353 --- .../camera_preview_controller_view.dart | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/src/views/camera/camera_preview_components/camera_preview_controller_view.dart b/lib/src/views/camera/camera_preview_components/camera_preview_controller_view.dart index 024be7b..a9e7465 100644 --- a/lib/src/views/camera/camera_preview_components/camera_preview_controller_view.dart +++ b/lib/src/views/camera/camera_preview_components/camera_preview_controller_view.dart @@ -337,10 +337,10 @@ class _CameraPreviewViewState extends State { return; } - if (Platform.isIOS) { - // android has a problem with this. Flash is turned off in the pausePreview function. + if (mc.cameraController?.value.flashMode != FlashMode.off) { await mc.cameraController?.setFlashMode(FlashMode.off); } + if (!mounted) { return; }