32 lines
666 B
Dart
32 lines
666 B
Dart
class Content {
|
|
final int order;
|
|
final String? text;
|
|
final String? audio;
|
|
final String? video;
|
|
final String? image;
|
|
|
|
const Content({
|
|
required this.order,
|
|
required this.text,
|
|
required this.audio,
|
|
required this.video,
|
|
required this.image,
|
|
});
|
|
|
|
factory Content.fromJson(Map<String, dynamic> json) => Content(
|
|
order: json['order'],
|
|
text: json['text'],
|
|
audio: json['audio'],
|
|
video: json['video'],
|
|
image: json['image'],
|
|
);
|
|
|
|
Map<String, dynamic> toJson() => {
|
|
'order': order,
|
|
'text': text,
|
|
'audio': audio,
|
|
'video': video,
|
|
'image': image,
|
|
};
|
|
}
|