Badge.fromJson constructor

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

Implementation

Badge.fromJson(Map<String, dynamic> json) {
  if (json["name"] is String) this.name = json["name"];
  if (json["img"] is String) this.img = json["img"];
  if (json["svg"] is String) this.svg = json["svg"];
  if (json["height"] is int) this.height = json["height"];
  if (json["width"] is int) this.width = json["width"];
  if (json["link"] is String) this.link = json["link"];
  if (json["img_2x"] is String) this.img2X = json["img_2x"];
  if (json["margin"] is String) this.margin = json["margin"];
  if (json["id"] is int) this.id = json["id"];
}