mintware-de / flutter_barcode_reader

A flutter plugin for reading 2D barcodes and QR codes.
MIT License
628 stars 464 forks source link

[Bug] Just can't get flutter barcode_scan to work #263

Closed davehindle closed 4 years ago

davehindle commented 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:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

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):

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

davehindle commented 4 years ago

Is this another case of my project needing to be migrated to embedded.android?

davehindle commented 4 years ago

Yes - needed to upgrade - sorry