# CroppingConfiguration.fromJson constructor

CroppingConfiguration.fromJson(

1. Map<String, dynamic> json

)

## Implementation

    factory CroppingConfiguration.fromJson(Map<String, dynamic> json) =>
        CroppingConfiguration(
          version:
              json.containsKey("version") ? json["version"] as String : "1.0",
          screen: json.containsKey("screen")
              ? json["screen"] as String
              : "CroppingConfiguration",
          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")),
          documentUuid: json["documentUuid"] as String,
          pageUuid: json["pageUuid"] as String,
          localization: json.containsKey("localization")
              ? CroppingTextLocalization.fromJson(
                  json["localization"] as Map<String, dynamic>)
              : CroppingTextLocalization(),
          appearance: json.containsKey("appearance")
              ? CroppingAppearanceConfiguration.fromJson(
                  json["appearance"] as Map<String, dynamic>)
              : CroppingAppearanceConfiguration(),
          cropping: json.containsKey("cropping")
              ? CroppingScreenConfiguration.fromJson(
                  json["cropping"] as Map<String, dynamic>)
              : CroppingScreenConfiguration(),
          documentAnalysisMode: json.containsKey("documentAnalysisMode")
              ? DocumentAnalysisMode.values
                  .byName(json["documentAnalysisMode"] as String)
              : DocumentAnalysisMode.UNFILTERED_DOCUMENT,
        );