From d91441bac9ab5bed8abc073521a012b8a95e6ed7 Mon Sep 17 00:00:00 2001 From: Vadim <44135514+vodemn@users.noreply.github.com> Date: Tue, 8 Aug 2023 11:46:43 +0200 Subject: [PATCH] ML-95 Live histogram (#100) * Removed redundant `stopImageStream()` --- .../camera_preview/components/histogram/widget_histogram.dart | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/screens/metering/components/camera_container/components/camera_preview/components/histogram/widget_histogram.dart b/lib/screens/metering/components/camera_container/components/camera_preview/components/histogram/widget_histogram.dart index 6964e77..05dfa9d 100644 --- a/lib/screens/metering/components/camera_container/components/camera_preview/components/histogram/widget_histogram.dart +++ b/lib/screens/metering/components/camera_container/components/camera_preview/components/histogram/widget_histogram.dart @@ -28,7 +28,9 @@ class _CameraHistogramState extends State { @override void dispose() { - widget.controller.stopImageStream(); + /// There is no need to stop image stream here, + /// because this widget will be disposed when CameraController is disposed + /// widget.controller.stopImageStream(); super.dispose(); }