import 'package:PiliPlus/models/video_detail/episode.dart'; class SectionItem { int? seasonId; int? id; String? title; int? type; List? episodes; bool isReversed = false; SectionItem({this.seasonId, this.id, this.title, this.type, this.episodes}); factory SectionItem.fromJson(Map json) => SectionItem( seasonId: json['season_id'] as int?, id: json['id'] as int?, title: json['title'] as String?, type: json['type'] as int?, episodes: (json['episodes'] as List?) ?.map((e) => EpisodeItem.fromJson(e as Map)) .toList(), ); }