# DocumentPolygonConfiguration.fromJson constructor

DocumentPolygonConfiguration.fromJson(

1. Map<String, dynamic> json

)

## Implementation

    factory DocumentPolygonConfiguration.fromJson(Map<String, dynamic> json) =>
        DocumentPolygonConfiguration(
          visibility: json.containsKey("visibility")
              ? UserGuidanceVisibility.values.byName(json["visibility"] as String)
              : UserGuidanceVisibility.ENABLED,
          documentOk: json.containsKey("documentOk")
              ? PolygonStyle.fromJson(json["documentOk"] as Map<String, dynamic>)
              : PolygonStyle(
                  strokeColor: ScanbotColor("?sbColorPositive"),
                  fillColor: ScanbotColor("#00000000"),
                  strokeWidth: 2.0),
          documentNotOk: json.containsKey("documentNotOk")
              ? PolygonStyle.fromJson(
                  json["documentNotOk"] as Map<String, dynamic>)
              : PolygonStyle(
                  strokeColor: ScanbotColor("?sbColorNegative"),
                  fillColor: ScanbotColor("#00000000"),
                  strokeWidth: 2.0),
          autoSnapProgress: json.containsKey("autoSnapProgress")
              ? PolygonStyle.fromJson(
                  json["autoSnapProgress"] as Map<String, dynamic>)
              : PolygonStyle(
                  strokeColor: ScanbotColor("#40A9FF"),
                  fillColor: ScanbotColor("#00000000"),
                  strokeWidth: 2.0),
        );