Cast.fromJson constructor

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

Implementation

Cast.fromJson(Map<String, dynamic> json) {
  this.character = json['character'];
  this.creditId = json['credit_id'];
  this.posterPath = Utils.userConditionalUrl(
      json['poster_path'], json['backdrop_path'], true);
  this.backdropPath = Utils.userConditionalUrl(
      json['poster_path'], json['backdrop_path'], false);
  this.originalLanguage = json['original_language'];
  this.originalTitle = json['original_title'];
  this.title = json['title'];
  this.overview = json['overview'];
  this.releaseDate = json['release_date'];
  this.video = json['video'];
  this.adult = json['adult'];
  this.popularity = json['popularity'];
  this.voteAverage = json['vote_average'];
  this.id = json['id'];
  this.voteCount = json['vote_count'];

  List<dynamic> genreIdsList = json['genre_ids'];
  this.genreIds = new List();
  if (genreIdsList != null) {
    this.genreIds.addAll(genreIdsList.map((o) => int.tryParse(o.toString())));
  }
}