barcode_scanner icon indicating copy to clipboard operation
barcode_scanner copied to clipboard

Application goes to black screen state.....

Open Adarsh2002014 opened this issue 1 year ago • 5 comments

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

Adarsh2002014 avatar Jan 27 '24 17:01 Adarsh2002014

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.

itsarvinddev avatar Feb 03 '24 21:02 itsarvinddev

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

Pablo-Aldana avatar Feb 11 '24 14:02 Pablo-Aldana

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

itsarvinddev avatar Feb 24 '24 10:02 itsarvinddev

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

Adarsh2002014 avatar Mar 10 '24 06:03 Adarsh2002014

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

JBtronic avatar Apr 26 '24 11:04 JBtronic