BadgesResponse.fromJson constructor

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

Implementation

factory BadgesResponse.fromJson(Map<String, dynamic> json) {
  var list = json['rows'] as List;
  List<Badge>? games =
      list.isEmpty ? null : list.map((i) => Badge.fromJson(i)).toList();

  return BadgesResponse(
    badges: games,
    count: json['count'],
  );
}