# DocumentScanningFlow.fromJson constructor

DocumentScanningFlow.fromJson(

1. Map<String, dynamic> json

)

## Implementation

    factory DocumentScanningFlow.fromJson(Map<String, dynamic> json) =>
        DocumentScanningFlow(
          version:
              json.containsKey("version") ? json["version"] as String : "1.0",
          screen: json.containsKey("screen")
              ? json["screen"] as String
              : "DocumentScanner",
          palette: json.containsKey("palette")
              ? Palette.fromJson(json["palette"] as Map<String, dynamic>)
              : Palette(
                  sbColorPrimary: ScanbotColor("#C8193C"),
                  sbColorPrimaryDisabled: ScanbotColor("#F5F5F5"),
                  sbColorNegative: ScanbotColor("#FF3737"),
                  sbColorPositive: ScanbotColor("#4EFFB4"),
                  sbColorWarning: ScanbotColor("#FFCE5C"),
                  sbColorSecondary: ScanbotColor("#FFEDEE"),
                  sbColorSecondaryDisabled: ScanbotColor("#F5F5F5"),
                  sbColorOnPrimary: ScanbotColor("#FFFFFF"),
                  sbColorOnSecondary: ScanbotColor("#C8193C"),
                  sbColorSurface: ScanbotColor("#FFFFFF"),
                  sbColorOutline: ScanbotColor("#EFEFEF"),
                  sbColorOnSurfaceVariant: ScanbotColor("#707070"),
                  sbColorOnSurface: ScanbotColor("#000000"),
                  sbColorSurfaceLow: ScanbotColor("#00000026"),
                  sbColorSurfaceHigh: ScanbotColor("#0000007A"),
                  sbColorModalOverlay: ScanbotColor("#000000A3")),
          localization: json.containsKey("localization")
              ? DocumentScannerTextLocalization.fromJson(
                  json["localization"] as Map<String, dynamic>)
              : DocumentScannerTextLocalization(),
          appearance: json.containsKey("appearance")
              ? DocumentFlowAppearanceConfiguration.fromJson(
                  json["appearance"] as Map<String, dynamic>)
              : DocumentFlowAppearanceConfiguration(),
          outputSettings: json.containsKey("outputSettings")
              ? DocumentScannerOutputSettings.fromJson(
                  json["outputSettings"] as Map<String, dynamic>)
              : DocumentScannerOutputSettings(),
          screens: json.containsKey("screens")
              ? DocumentScannerScreens.fromJson(
                  json["screens"] as Map<String, dynamic>)
              : DocumentScannerScreens(),
          documentUuid: json.containsKey("documentUuid")
              ? (json["documentUuid"] != null
                  ? json["documentUuid"] as String
                  : null)
              : null,
          cleanScanningSession: json.containsKey("cleanScanningSession")
              ? (json["cleanScanningSession"] as bool)
              : true,
        );