# startBarcodeScanner static method

Future<BarcodeScanningResult> startBarcodeScanner(

1. BarcodeScannerConfiguration config

)

Starts the Ready-to-Use Barcode Scanner UI as full-screen modal UI dialog. The Barcode Scanner is able to recognize 1D- and 2D-barcodes (QR codes, etc).

## Implementation

    static Future<BarcodeScanningResult> startBarcodeScanner(
        BarcodeScannerConfiguration config) async {
      try {
        var result = await _invoke('startBarcodeScanner', config.toJson());
        if (_wasCanceled(result)) {
          return BarcodeScanningResult.canceled();
        }
        return BarcodeScanningResult.fromJson(jsonDecode(result));
      } catch (e) {
        Logger.root.severe(e);
        return BarcodeScanningResult.error(e.toString());
      }
    }