mobile_scanner
mobile_scanner copied to clipboard
`updateScanWindow` method broken
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
- Clone the repository and run
flutter run - Attempt to scan something. You should see it in debug console
- Try to change the scanWindow by using the bottom right icon
- Now you can no longer scan anything
- It appears that if you remove the
scanWindowUpdateThreshold: 1000it works
@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.
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?
You are probably still confusing the window dimension threshold with the scanner timeout?
The scanWindowUpdateThreshold has nothing to do with durations.