FindAndPickArOverlayPolygonConfiguration.fromJson constructor

FindAndPickArOverlayPolygonConfiguration.fromJson(
  1. Map<String, dynamic> json
)

Implementation

factory FindAndPickArOverlayPolygonConfiguration.fromJson(
        Map<String, dynamic> json) =>
    FindAndPickArOverlayPolygonConfiguration(
      visible: json.containsKey("visible") ? (json["visible"] as bool) : true,
      partiallyScanned: json.containsKey("partiallyScanned")
          ? PolygonStyle.fromJson(
              json["partiallyScanned"] as Map<String, dynamic>)
          : PolygonStyle(
              strokeColor: ScanbotColor("?sbColorWarning"),
              fillColor: ScanbotColor("#00000000"),
              strokeWidth: 3.0,
              cornerRadius: 5.0),
      rejected: json.containsKey("rejected")
          ? PolygonStyle.fromJson(json["rejected"] as Map<String, dynamic>)
          : PolygonStyle(
              strokeColor: ScanbotColor("?sbColorSurface"),
              fillColor: ScanbotColor("#00000000"),
              strokeWidth: 3.0,
              cornerRadius: 5.0),
      completed: json.containsKey("completed")
          ? PolygonStyle.fromJson(json["completed"] as Map<String, dynamic>)
          : PolygonStyle(
              strokeColor: ScanbotColor("?sbColorPositive"),
              fillColor: ScanbotColor("#00000000"),
              strokeWidth: 3.0,
              cornerRadius: 5.0),
    );