# BarcodeScannerConfiguration.fromJson constructor

BarcodeScannerConfiguration.fromJson(

1. Map<String, dynamic> json

)

## Implementation

    factory BarcodeScannerConfiguration.fromJson(Map<String, dynamic> json) =>
        BarcodeScannerConfiguration(
          barcodeFormatConfigurations:
              json.containsKey("barcodeFormatConfigurations")
                  ? (json["barcodeFormatConfigurations"] as List<dynamic>)
                      .map((it) => BarcodeFormatConfigurationBase.fromJson(
                          it as Map<String, dynamic>))
                      .toList()
                  : [BarcodeFormatCommonConfiguration()],
          extractedDocumentFormats: json.containsKey("extractedDocumentFormats")
              ? (json["extractedDocumentFormats"] as List<dynamic>)
                  .map((it) => BarcodeDocumentFormat.values.byName(it as String))
                  .toList()
              : [
                  BarcodeDocumentFormat.AAMVA,
                  BarcodeDocumentFormat.BOARDING_PASS,
                  BarcodeDocumentFormat.DE_MEDICAL_PLAN,
                  BarcodeDocumentFormat.MEDICAL_CERTIFICATE,
                  BarcodeDocumentFormat.ID_CARD_PDF_417,
                  BarcodeDocumentFormat.SEPA,
                  BarcodeDocumentFormat.SWISS_QR,
                  BarcodeDocumentFormat.VCARD,
                  BarcodeDocumentFormat.GS1,
                  BarcodeDocumentFormat.HIBC
                ],
          onlyAcceptDocuments: json.containsKey("onlyAcceptDocuments")
              ? (json["onlyAcceptDocuments"] as bool)
              : false,
          returnBarcodeImage: json.containsKey("returnBarcodeImage")
              ? (json["returnBarcodeImage"] as bool)
              : false,
          engineMode: json.containsKey("engineMode")
              ? BarcodeScannerEngineMode.values
                  .byName(json["engineMode"] as String)
              : BarcodeScannerEngineMode.NEXT_GEN,
          optimizedForOverlays: json.containsKey("optimizedForOverlays")
              ? (json["optimizedForOverlays"] as bool)
              : false,
        );