27 lines
551 B
Dart
27 lines
551 B
Dart
|
|
class SliderModel {
|
||
|
|
late int id;
|
||
|
|
late String title;
|
||
|
|
late String imageUrl;
|
||
|
|
late String content;
|
||
|
|
late String path;
|
||
|
|
late String type;
|
||
|
|
|
||
|
|
SliderModel({
|
||
|
|
required this.id,
|
||
|
|
required this.title,
|
||
|
|
required this.imageUrl,
|
||
|
|
required this.path,
|
||
|
|
required this.content,
|
||
|
|
required this.type,
|
||
|
|
});
|
||
|
|
|
||
|
|
SliderModel.fromJson(Map<String, dynamic> json) {
|
||
|
|
id = json['id'];
|
||
|
|
title = json['title'];
|
||
|
|
imageUrl = json['image_url'];
|
||
|
|
path = json['slider_path'] ?? '';
|
||
|
|
content = json['content'];
|
||
|
|
type = json['type'];
|
||
|
|
}
|
||
|
|
}
|