AmolGangadhare / flutter_barcode_scanner

Barcode scanner plugin for flutter. Supports barcode scanning for Android and iOS
https://pub.dev/packages/flutter_barcode_scanner
MIT License
379 stars 451 forks source link

FlutterBarcodeScanner.dismiss(); does not work #275

Open rodolfowf opened 2 years ago

rodolfowf commented 2 years ago

First, thanks for an awesome plugin.

I'd like know how I can to use FlutterBarcodeScanner.dismiss();.

For example, this code don't work. Am I missing something ?

`FlutterBarcodeScanner.getBarcodeStreamReceiver(

ff6666,

  Cancel,
  true,
  ScanMode.DEFAULT

)?.listen((barcode) async {

var r = await saveCollectQtd(barcode, qtdInfo); // return true or false

if (r == false) {
    FlutterBarcodeScanner.dismiss(); // HERE the dismiss does not work, the code is ignored
}

});`

regards

halmoussa commented 2 years ago

I do not even see this function anymore!