# startBatchBarcodeScanner static method

Future<BarcodeScanningResult> startBatchBarcodeScanner(

1. BatchBarcodeScannerConfiguration config

)

Starts the Ready-to-Use Batch 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> startBatchBarcodeScanner(
        BatchBarcodeScannerConfiguration config) async {
      try {
        var json = config.toJson();
        if (config.barcodeFormatter != null) {
          _initBatchFormatterHandler(
              _batchBarcodeFormatterCallbackChannel, config.barcodeFormatter!);
          _batchBarcodeFormatterCallbackChannel.setMethodCallHandler(_handler);
          json['shouldUseBarcodeFormatter'] = true;
        } else {
          _handler = null;
        }

        var barcodeScanningResult =
            await _channel.invokeMethod('startBatchBarcodeScanner', json);
        _handler = null;
        if (_wasCanceled(barcodeScanningResult)) {
          return BarcodeScanningResult.canceled();
        }
        return BarcodeScanningResult.fromJson(jsonDecode(barcodeScanningResult));
      } catch (e) {
        Logger.root.severe(e);
        return BarcodeScanningResult.error(e.toString());
      }
    }