juliansteenbakker / mobile_scanner

A universal scanner for Flutter based on MLKit. Uses CameraX on Android and AVFoundation on iOS.
BSD 3-Clause "New" or "Revised" License
744 stars 444 forks source link

Scanner is still receiving reads when StreamSubscription is paused #1008

Closed burekas7 closed 1 month ago

burekas7 commented 1 month ago

Hi,

First, thanks for this great package and your support here.

There is something weird regarding the StreamSubscription<BarcodeCapture>,

`streamSubscriptionScanner = controller.barcodes.listen(scannerlistenerCallback);

When I call: streamSubscription.pause() And move the scanner on a barcode, it doesn't read it, which is ok.

But when I call streamSubscription.resume(), the stream listener callback is called with the scanned value of the barcode that was scanned while I was on pause.