BadgeStyle.fromJson constructor

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

Implementation

factory BadgeStyle.fromJson(Map<String, dynamic> json) => BadgeStyle(
      visible: json.containsKey("visible") ? (json["visible"] as bool) : true,
      background: json.containsKey("background")
          ? BackgroundStyle.fromJson(
              json["background"] as Map<String, dynamic>)
          : BackgroundStyle(),
      foregroundColor: json.containsKey("foregroundColor")
          ? ScanbotColor(json["foregroundColor"] as String)
          : ScanbotColor("?sbColorOnSurface"),
    );