Season.fromMap constructor

Season.fromMap(
  1. Map<String, dynamic> json
)

Implementation

factory Season.fromMap(Map<String, dynamic> json) => Season(
      airDate: DateTime.tryParse(
        json['air_date'] as String? ?? '',
      ),
      episodeCount: json['episode_count'] as int? ?? 0,
      id: json['id'] as int? ?? 0,
      name: json['name'] as String? ?? '',
      overview: json['overview'] as String? ?? '',
      posterPath: json['poster_path'] as String? ?? '',
      seasonNumber: json['season_number'] as int? ?? 0,
    );