GamesResponse.fromJson constructor

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

Implementation

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

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