RafaelBarbosatec / qr_code_dart_scan

A QR code scanner that works on both iOS and Android using dart decoder.
MIT License
15 stars 20 forks source link

Rescan an already scanned QR code #21

Closed scognito closed 3 months ago

scognito commented 4 months ago

I'm using the live mode. When I scan a QR code and then a different one, everything works fine. When I scan a QR code, then move the camera around, and try to scan the same again, it is not scanned: I have to scan another one and then the old one can be scanned again. Is it intended maybe to avoid multiple scan almost simultaneously? If it is, can at least an option be set? Or maybe I'm doing something wrong? This is my code, very simple:

QRCodeDartScanView(
                typeCamera: typeCamera,
                scanInvertedQRCode: true,
                typeScan: TypeScan.live,
                heightPreview: heightPreview,
                widthPreview: widthPreview,
                onCapture: (Result result) {
                  print(result.text);
                },
              ),

In my app I want to scan the same QR code more than one time, I'm using a debouncing function to avoid to scan after 1-2 seconds.

Thanks for this awesome library.

RafaelBarbosatec commented 4 months ago

Hi @scognito ! Thanks for contacting! Great, it's a good idea, I'll implements that to the next release.

RafaelBarbosatec commented 4 months ago

Fixed in latest release

scognito commented 4 months ago

How can I use this feature? Thanks

scognito commented 3 months ago

Any update on this?

miitiicoo commented 3 months ago

Fixed in latest release

Hey Rafael i need this fix too! How can i use it?

RafaelBarbosatec commented 3 months ago

Hi @scognito and @miitiicoo ! Just use. Now we have a param intervalScan. The default value is 1 second. And was removed the validation to not scan the same barCode twice or more consecutive.

scognito commented 3 months ago

you can close this :)