31 lines
725 B
Dart
31 lines
725 B
Dart
class MainPageContentType {
|
|
final int id;
|
|
final String title;
|
|
final String image;
|
|
final String link;
|
|
bool marked;
|
|
final List<String> subtitles;
|
|
final int? duration;
|
|
|
|
MainPageContentType({
|
|
required this.id,
|
|
required this.title,
|
|
required this.image,
|
|
required this.link,
|
|
required this.marked,
|
|
required this.subtitles,
|
|
this.duration,
|
|
});
|
|
|
|
factory MainPageContentType.fromJson(Map<String, dynamic> json) =>
|
|
MainPageContentType(
|
|
id: json['id'],
|
|
title: json['title'],
|
|
image: json['image'],
|
|
link: json['link'],
|
|
marked: json['marked'],
|
|
subtitles: List<String>.from(json['subtitles']),
|
|
duration: json['duration'],
|
|
);
|
|
}
|