mohesu / barcode_scanner

A universal barcode and QR code scanner for Flutter based on MLKit. Uses CameraX on Android, AVFoundation on iOS and Apple Vision & AVFoundation on macOS.
Apache License 2.0
41 stars 31 forks source link

Application goes to black screen state..... #85

Open Adarsh2002014 opened 9 months ago

Adarsh2002014 commented 9 months ago

@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); }

rvndsngwn commented 9 months ago

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.

Pablo-Aldana commented 9 months ago

I have the latest version and it does indeed show a black screen any ideas? thanks!

rvndsngwn commented 8 months ago

Hi @Pablo-Aldana Ensure that your app has permission to access the camera.

Adarsh2002014 commented 8 months ago

@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.....

JBtronic commented 6 months ago

You are encountering navigation issue, fix your navigation! try with canPop: true and remove Navigator.of(context).pop(); from if (context.mounted){}