File tree Expand file tree Collapse file tree 2 files changed +7
-0
lines changed
Expand file tree Collapse file tree 2 files changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -115,6 +115,9 @@ Known issues:
115115* [ Apple] The scan window does not work correctly.
116116* [ Apple] The camera flash briefly shows when the camera is started.
117117
118+ ## 6.0.9
119+ Fixed onDetect not working when a ` MobileScannerController ` is provided.
120+
118121## 6.0.8
119122Improvements:
120123* [ Android] Remove the dependency on ` org.jetbrains.kotlin:kotlin-bom ` .
Original file line number Diff line number Diff line change @@ -288,12 +288,16 @@ class _MobileScannerState extends State<MobileScanner>
288288
289289 if (widget.controller == null ) {
290290 WidgetsBinding .instance.addObserver (this );
291+ }
292+
293+ if (widget.onDetect != null ) {
291294 _subscription = controller.barcodes.listen (
292295 widget.onDetect,
293296 onError: widget.onDetectError,
294297 cancelOnError: false ,
295298 );
296299 }
300+
297301 if (controller.autoStart) {
298302 await controller.start ();
299303 }
You can’t perform that action at this time.
0 commit comments