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: BackgroundStyle.fromJson(
          json["background"] as Map<String, dynamic>),
      foregroundColor: json.containsKey("foregroundColor")
          ? ScanbotColor(json["foregroundColor"] as String)
          : ScanbotColor("?sbColorOnSurface"),
    );