I'm using the barcode_scan package to get barcode information.
barcode_scan: ^3.0.1
I have a super simple test scenario set up like this:
ScanResult result = await BarcodeScanner.scan();
print(result.rawContent);
I see the barcode scanner screen show up, and it appears to detect the barcode because as soon as I focus on the barcode it pauses and the closes the barcode scanner screen. however, it never reaches the line below print(result.rawContent);
I'm not seeing any errors either. I've tried wrapping the whole thing in a try catch just to see, but it never entered the catch. It's like it just doesn't return anything from the await BarcodeScanner.scan()
call and just aborts completely.
I'm not sure what I'm doing wrong here.
I solved downgrading barcode_scan
from 3.0.1
to 2.0.0
.
I hope it helps
I meet the same issue on my existing project was created on old version of flutter, when I create new project with last version of flutter(1.12.x-pre) it is work find.
It is not bug, I just found new issue on barcode_scan.
Issue: https://github.com/mintware-de/flutter_barcode_reader/issues/261#issue-643704981
I'm a newer of flutter.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With