Movies.fromJson constructor

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

Implementation

factory Movies.fromJson(Map<String, dynamic> json) => Movies(
  adult: json["adult"],
  backdropPath: json["backdrop_path"],
  belongsToCollection: json["belongs_to_collection"],
  budget: json["budget"],
  genres: List<Genre>.from(json["genres"].map((x) => Genre.fromJson(x))),
  homepage: json["homepage"],
  id: json["id"],
  imdbId: json["imdb_id"],
  originalLanguage: json["original_language"],
  originalTitle: json["original_title"],
  overview: json["overview"],
  popularity: json["popularity"].toDouble(),
  posterPath: json["poster_path"],
  productionCompanies: List<ProductionCompany>.from(json["production_companies"].map((x) => ProductionCompany.fromJson(x))),
  productionCountries: List<ProductionCountry>.from(json["production_countries"].map((x) => ProductionCountry.fromJson(x))),
  releaseDate: DateTime.parse(json["release_date"]),
  revenue: json["revenue"],
  runtime: json["runtime"],
  spokenLanguages: List<SpokenLanguage>.from(json["spoken_languages"].map((x) => SpokenLanguage.fromJson(x))),
  status: json["status"],
  tagline: json["tagline"],
  title: json["title"],
  video: json["video"],
  voteAverage: json["vote_average"].toDouble(),
  voteCount: json["vote_count"],
);