基础组件库
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

41 lines
1.1 KiB

  1. class HomeBannerModel {
  2. List<HomeBannerListItemModel> list;
  3. HomeBannerModel({this.list});
  4. factory HomeBannerModel.fromJson(Map<String, dynamic> json) {
  5. return HomeBannerModel(
  6. list: json['list'] != null ? (json['list'] as List).map((i) => HomeBannerListItemModel.fromJson(i)).toList() : null,
  7. );
  8. }
  9. Map<String, dynamic> toJson() {
  10. final Map<String, dynamic> data = new Map<String, dynamic>();
  11. if (this.list != null) {
  12. data['list'] = this.list.map((v) => v.toJson()).toList();
  13. }
  14. return data;
  15. }
  16. }
  17. class HomeBannerListItemModel {
  18. String img;
  19. String skip_identifier;
  20. HomeBannerListItemModel({this.img, this.skip_identifier});
  21. factory HomeBannerListItemModel.fromJson(Map<String, dynamic> json) {
  22. return HomeBannerListItemModel(
  23. img: json['img']?.toString(),
  24. skip_identifier: json['skip_identifier']?.toString(),
  25. );
  26. }
  27. Map<String, dynamic> toJson() {
  28. final Map<String, dynamic> data = new Map<String, dynamic>();
  29. data['img'] = this.img;
  30. data['skip_identifier'] = this.skip_identifier;
  31. return data;
  32. }
  33. }