toMap method
Implementation
Map<String, dynamic> toMap() {
final _toMap = {
'belongs_to_collection': this.belongsToCollection?.toMap(),
'budget': this.budget,
'genres': this.genres.map((e) => e.toMap()).toList(),
'homepage': this.homepage,
'imdb_id': this.imdbId,
'production_companies':
this.productionCompanies.map((e) => e.toMap()).toList(),
'production_countries':
this.productionCountries.map((e) => e.toMap()).toList(),
'revenue': this.revenue,
'runtime': this.runtime,
'spoken_languages': this.spokenLanguages.map((e) => e.toMap()).toList(),
'status': this.status,
'tagline': this.tagline,
'images': this.images?.toMap(),
'alternative_titles':
this.alternativeTitles.map((e) => e.toMap()).toList(),
'credits': this.credits?.toMap(),
'external_ids': this.externalIds?.toMap(),
'keywords': this.keywords.map((e) => e.toMap()).toList(),
'videos': this.videos.map((e) => e.toMap()).toList(),
'recommendations': this.recommendations.map((e) => e.toMap()).toList(),
'similar': this.similar.map((e) => e.toMap()).toList(),
'watch_providers': this.watchProviders.map(
(key, value) {
return MapEntry(
key,
value.toMap(),
);
},
),
};
_toMap.addAll(super.toMap());
return _toMap;
}