Movie.fromJson constructor

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

Implementation

factory Movie.fromJson(Map<String, dynamic> json) {
  return Movie(
    id: json['_id'],
    name: json['name'],
    runtimeInMinutes: json['runtimeInMinutes'],
    budgetInMillions: json['budgetInMillions'],
    boxOfficeRevenueInMillions:
        Utils.toDouble(json['boxOfficeRevenueInMillions']),
    academyAwardNominations: json['academyAwardNominations'],
    academyAwardWins: json['academyAwardWins'],
    rottenTomatoesScore: Utils.toDouble(json['rottenTomatoesScore']),
  );
}