FindAndPickBadgeConfiguration.fromJson constructor

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

Implementation

factory FindAndPickBadgeConfiguration.fromJson(Map<String, dynamic> json) =>
    FindAndPickBadgeConfiguration(
      partiallyScanned: json.containsKey("partiallyScanned")
          ? BadgeStyle.fromJson(
              json["partiallyScanned"] as Map<String, dynamic>)
          : BadgeStyle(
              visible: true,
              background: BackgroundStyle(
                  strokeColor: ScanbotColor("#FFFFFF30"),
                  fillColor: ScanbotColor("?sbColorWarning"),
                  strokeWidth: 0.0),
              foregroundColor: ScanbotColor("?sbColorOnSurface")),
      rejected: json.containsKey("rejected")
          ? BadgeStyle.fromJson(json["rejected"] as Map<String, dynamic>)
          : BadgeStyle(
              visible: true,
              background: BackgroundStyle(
                  strokeColor: ScanbotColor("#FFFFFF30"),
                  fillColor: ScanbotColor("?sbColorNegative"),
                  strokeWidth: 0.0),
              foregroundColor: ScanbotColor("?sbColorOnSurface")),
      completed: json.containsKey("completed")
          ? BadgeStyle.fromJson(json["completed"] as Map<String, dynamic>)
          : BadgeStyle(
              visible: true,
              background: BackgroundStyle(
                  strokeColor: ScanbotColor("#FFFFFF30"),
                  fillColor: ScanbotColor("?sbColorPositive"),
                  strokeWidth: 0.0),
              foregroundColor: ScanbotColor("?sbColorOnSurface")),
    );