Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
Adarsh2002014 opened this issue Jan 27, 2024 · 5 comments
Open

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

Adarsh2002014 opened this issue Jan 27, 2024 · 5 comments

Comments

@Adarsh2002014
Copy link

@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
Copy link
Member

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
Copy link

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

@rvndsngwn
Copy link
Member

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

@Adarsh2002014
Copy link
Author

Adarsh2002014 commented Mar 10, 2024

@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
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants