Genre.fromJson constructor

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

get the model from the json

Implementation

factory Genre.fromJson(Map<String, dynamic> json) {
  return Genre(
    id: json["id"] ?? 0,
    name: json["name"] ?? "",
    slug: json["slug"] ?? "",
    gamesCount: json["games_count"] ?? 0,
    imageBackground: json["image_background"] ?? "",
  );
}