Badge.fromJson constructor

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

Implementation

factory Badge.fromJson(Map<String, dynamic> json) {
  var badge = Badge(
      identifier: json['identifier'],
      title: json['title'],
      isActive: json['isActive']);

  json['iconLink'] != null
      ? badge.iconLink = json['iconLink']
      : badge.iconLink = "";
  json['description'] != null
      ? badge.description = json['description']
      : badge.description = "";

  return badge;
}