Closed davehindle closed 4 years ago
BUG REPORTS WITHOUT PROVIDING THESE INFORMATIONS WILL BE CLOSED DIRECTLY. DON'T REMOVE THE SECTIONS!
Describe the bug Make a call to scan() -> scanner window appears -> focus on QR code -> scanner window closes, but nothing returned from scan() call
To Reproduce Steps to reproduce the behavior:
Expected behavior I expected to get a value returned
Screenshots If applicable, add screenshots to help explain your problem.
Logs If applicable, add the verbose output of flutter run.
flutter run
Environment (please complete the following information):
barcode_scan
flutter --version
Flutter ...
Additional context Here's a snippet - execution never reaches the last line (the print).....
Future verify(BuildContext context, bool initialise) async { await showDialog( context: context, barrierDismissible: false, builder: (BuildContext context) { return WillPopScope( onWillPop: () async => false, child: AlertDialog( title: Text("Scan Your Table Code"), content: Column( children: [ Text( "Scan a QR code."), FlatButton( child: Text("Click Here"), onPressed: () async { try { ScanResult scan = await BarcodeScanner.scan(options: ScanOptions(restrictFormat: [BarcodeFormat.qr])); print(scan.rawContent);
Is this another case of my project needing to be migrated to embedded.android?
Yes - needed to upgrade - sorry
BUG REPORTS WITHOUT PROVIDING THESE INFORMATIONS WILL BE CLOSED DIRECTLY. DON'T REMOVE THE SECTIONS!
Describe the bug Make a call to scan() -> scanner window appears -> focus on QR code -> scanner window closes, but nothing returned from scan() call
To Reproduce Steps to reproduce the behavior:
Expected behavior I expected to get a value returned
Screenshots If applicable, add screenshots to help explain your problem.
Logs If applicable, add the verbose output of
flutter run
.Environment (please complete the following information):
barcode_scan
: 3.0.1flutter --version
: 1.19.0-5.0.preAdditional context Here's a snippet - execution never reaches the last line (the print).....
Future verify(BuildContext context, bool initialise) async {
await showDialog(
context: context,
barrierDismissible: false,
builder: (BuildContext context) {
return WillPopScope(
onWillPop: () async => false,
child: AlertDialog(
title: Text("Scan Your Table Code"),
content: Column(
children: [
Text(
"Scan a QR code."),
FlatButton(
child: Text("Click Here"),
onPressed: () async {
try {
ScanResult scan = await BarcodeScanner.scan(options: ScanOptions(restrictFormat: [BarcodeFormat.qr]));
print(scan.rawContent);