|
|
@@ -7,7 +7,11 @@ class HomeBannerModel { |
|
|
|
|
|
|
|
factory HomeBannerModel.fromJson(Map<String, dynamic> json) { |
|
|
|
return HomeBannerModel( |
|
|
|
list: json['list'] != null ? (json['list'] as List).map((i) => HomeBannerListItemModel.fromJson(i)).toList() : null, |
|
|
|
list: json['list'] != null |
|
|
|
? (json['list'] as List) |
|
|
|
.map((i) => HomeBannerListItemModel.fromJson(i)) |
|
|
|
.toList() |
|
|
|
: null, |
|
|
|
); |
|
|
|
} |
|
|
|
|
|
|
@@ -20,23 +24,19 @@ class HomeBannerModel { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
class HomeBannerListItemModel extends SkipModel{ |
|
|
|
class HomeBannerListItemModel extends SkipModel { |
|
|
|
String img; |
|
|
|
String skip_identifier; |
|
|
|
|
|
|
|
HomeBannerListItemModel({this.img, this.skip_identifier}); |
|
|
|
HomeBannerListItemModel({this.img}); |
|
|
|
|
|
|
|
factory HomeBannerListItemModel.fromJson(Map<String, dynamic> json) { |
|
|
|
return HomeBannerListItemModel( |
|
|
|
img: json['img']?.toString(), |
|
|
|
skip_identifier: json['skip_identifier']?.toString(), |
|
|
|
); |
|
|
|
HomeBannerListItemModel.fromJson(Map<String, dynamic> json) { |
|
|
|
super.fromJson(json); |
|
|
|
img = json['img']?.toString(); |
|
|
|
} |
|
|
|
|
|
|
|
Map<String, dynamic> toJson() { |
|
|
|
final Map<String, dynamic> data = new Map<String, dynamic>(); |
|
|
|
final Map<String, dynamic> data = super.toJson(); |
|
|
|
data['img'] = this.img; |
|
|
|
data['skip_identifier'] = this.skip_identifier; |
|
|
|
return data; |
|
|
|
} |
|
|
|
} |