import 'package:PiliPlus/models_new/space/space_archive/episodic_button.dart'; import 'package:PiliPlus/models_new/space/space_archive/item.dart'; import 'package:PiliPlus/models_new/space/space_archive/last_watched_locator.dart'; import 'package:PiliPlus/models_new/space/space_archive/order.dart'; class SpaceArchiveData { EpisodicButton? episodicButton; List? order; int? count; List? item; LastWatchedLocator? lastWatchedLocator; bool? hasNext; bool? hasPrev; int? next; SpaceArchiveData({ this.episodicButton, this.order, this.count, this.item, this.lastWatchedLocator, this.hasNext, this.hasPrev, this.next, }); factory SpaceArchiveData.fromJson(Map json) => SpaceArchiveData( episodicButton: json['episodic_button'] == null ? null : EpisodicButton.fromJson( json['episodic_button'] as Map, ), order: (json['order'] as List?) ?.map((e) => Order.fromJson(e as Map)) .toList(), count: json['count'] as int?, item: (json['item'] as List?) ?.map((e) => SpaceArchiveItem.fromJson(e as Map)) .toList(), lastWatchedLocator: json['last_watched_locator'] == null ? null : LastWatchedLocator.fromJson( json['last_watched_locator'] as Map, ), hasNext: json['has_next'] as bool?, hasPrev: json['has_prev'] as bool?, next: json['next'], ); }