barcode_scanner
barcode_scanner copied to clipboard
Application goes to black screen state.....
@rvndsngwn Below is the file which has the log's of the following which may help you. Logs.txt
Current code:-
onPressed: () async { try { await Navigator.of(context).push( MaterialPageRoute( builder: (context) => AiBarcodeScanner( canPop: false, controller: MobileScannerController( detectionSpeed: DetectionSpeed.noDuplicates), onScan: (String value) { print(value); barcode = value; barcodeValue.text = barcode; if (context.mounted) { Navigator.of(context).pop(); setState(() {}); } }, ), ), ); } catch (e) { print(e); }
Hi @Adarsh2002014,
The latest version of this package has been released: ai_barcode_scanner: ^3.4.3.
Let me know if you are still facing this issue.
I have the latest version and it does indeed show a black screen any ideas? thanks!
Hi @Pablo-Aldana Ensure that your app has permission to access the camera.
@rvndsngwn i detected that when there is barcode and qr code together this problem occur, and i have also updated my library to version to 3.4.3. Still there is same error.
Is there any way that it only scan barcode.....
You are encountering navigation issue, fix your navigation! try with canPop: true and remove Navigator.of(context).pop(); from if (context.mounted){}