基础组件库
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.
 
 
 
 
 

48 regels
1.2 KiB

  1. class BackgroundModel {
  2. HeaderBg headerBg;
  3. String bgColor;
  4. BackgroundModel({this.headerBg, this.bgColor});
  5. BackgroundModel.fromJson(Map<String, dynamic> json) {
  6. headerBg = json['header_bg'] != null
  7. ? new HeaderBg.fromJson(json['header_bg'])
  8. : null;
  9. bgColor = json['bg_color'];
  10. }
  11. Map<String, dynamic> toJson() {
  12. final Map<String, dynamic> data = new Map<String, dynamic>();
  13. if (this.headerBg != null) {
  14. data['header_bg'] = this.headerBg.toJson();
  15. }
  16. data['bg_color'] = this.bgColor;
  17. return data;
  18. }
  19. }
  20. class HeaderBg {
  21. String height;
  22. String mainColor;
  23. String assistColor;
  24. String minorColor;
  25. HeaderBg({this.height, this.mainColor, this.assistColor, this.minorColor});
  26. HeaderBg.fromJson(Map<String, dynamic> json) {
  27. height = json['height'];
  28. mainColor = json['main_color'];
  29. assistColor = json['assist_color'];
  30. minorColor = json['minor_color'];
  31. }
  32. Map<String, dynamic> toJson() {
  33. final Map<String, dynamic> data = new Map<String, dynamic>();
  34. data['height'] = this.height;
  35. data['main_color'] = this.mainColor;
  36. data['assist_color'] = this.assistColor;
  37. data['minor_color'] = this.minorColor;
  38. return data;
  39. }
  40. }