banner_model.dart 707 B

123456789101112131415161718192021222324252627282930313233
  1. import 'dart:core';
  2. /// @author: bo.zeng
  3. /// @email: cnhbwds@gmail.com
  4. /// @date: 2025 2025/4/15 13:16
  5. /// @description:
  6. // banner_model.dart
  7. class BannerItem {
  8. final String title;
  9. final String img;
  10. final String num;
  11. final String holderImg;
  12. final List<String> logo;
  13. BannerItem({
  14. required this.title,
  15. required this.img,
  16. required this.num,
  17. required this.holderImg,
  18. required this.logo,
  19. });
  20. factory BannerItem.fromJson(Map<String, dynamic> json) {
  21. return BannerItem(
  22. title: json['title'] ?? '',
  23. img: json['img'] ?? '',
  24. num: json['num'] ?? '',
  25. holderImg: json['holderImg'] ?? '',
  26. logo: List<String>.from(json['logo'] ?? []),
  27. );
  28. }
  29. }