GameCollection.fromJson constructor

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

Implementation

GameCollection.fromJson(Map<String, dynamic> json) {
  game = json['list_game'];
  if (json['list_game'] != null) {
    game = [];
    json['list_game'].forEach((v) {
      if (v is GameListModel){
        game?.add(v);
      }
      // game.add(GameListModel.fromJson(v));
    });
  }
}