Flutter: Most common pitfalls

1. Do you have a sample code snippet for continuous scanning? #

In the case of running a continuous scan, you can follow these steps:

                    _barkoder.setCloseSessionOnResultEnabled(false);
    _barkoder.setImageResultEnabled(false);
            

2. Can you provide a short explanation of what result.textualData contains and how it should be used? #

In order to demonstrate how to use the startScanning method, here is an example:

                    _barkoder!.startScanning((result) {
          setState(() {
            scannedResult = result.decoderResults[0].textualData;
            isScanning = false;
          });
        });
            

Using this method, you can get the results for the MRZ or barcode - textualData is formatted, while extraData is a bit more detailed:

                    result.decoderResults[0].textualData
            
                    result.decoderResults[0].extra?.toString() ?? '' // if you like to print as String
            

It is up to you as to how you use or manipulate/extract fields from the string in the way that works best for you

3.

Page Contents

History:

close