Open adamglin0 opened 4 weeks ago
After checking, the problem is Flow.debounce(debounce)
qrScannerPlugin.getQrCodeFlow(debounce = 0)
In the example given, the debounce value is 500, which may cause the latest data to not be sent out in time because it is filtered out. Set it to 0, and now the QR code content can be obtained immediately.
After checking, the problem is Flow.debounce(debounce)
qrScannerPlugin.getQrCodeFlow(debounce = 0)
In the example given, the debounce value is 500, which may cause the latest data to not be sent out in time because it is filtered out. Set it to 0, and now the QR code content can be obtained immediately.
Yes, if the QR code remains on the screen, the debounce will continue to be triggered until 500ms after the screen no longer recognizes the QR code.
It would be ideal to add distinctUntilChanged before debounce.
@adamglin0 nice idea but this is a different issue on ios and flow issue is a different one. I guess rather then using flow it should be an atomic operation ill look into it more and then update the issue
Android has the same problem