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
781 stars 460 forks source link

`updateScanWindow` method broken #1099

Open simplenotezy opened 1 month ago

simplenotezy commented 1 month ago

The updateScanWindow does not work. After calling the method, scanning is no longer possible. Nothing will be outputted to the stream.

Example repo: https://github.com/simplenotezy/broken-mobile-scanner-example

navaronbracke commented 1 month ago

@simplenotezy To quote your earlier response

I set the treshold to 1000 because when scanning tickets for an event, I found it impossible for any operator to scan tickets faster than every 1 second

Do you mean using the scan timeout? The scanWindowUpdateThreshold is used to prevent the scan window quickly updating when for example the scanner dimensions change (for example due to a resize)

But yes, perhaps we can distinguish between the two in the docs a bit better.

simplenotezy commented 1 month ago

I see. I noticed that when using scanWindowUpdateThreshold to 0 barcodes keep being scanned very quickly. If I set it to 1000, barcodes will scan only once every 1 second. Or am I missing something here?

navaronbracke commented 1 month ago

You are probably still confusing the window dimension threshold with the scanner timeout? The scanWindowUpdateThreshold has nothing to do with durations.