基础库
Nie możesz wybrać więcej, niż 25 tematów Tematy muszą się zaczynać od litery lub cyfry, mogą zawierać myślniki ('-') i mogą mieć do 35 znaków.
 
 
 
 
 

97 wiersze
2.4 KiB

  1. class WidgetModel {
  2. int modId;
  3. int modPid;
  4. String modName;
  5. String position;
  6. String skipIdentifier;
  7. String title;
  8. String subtitle;
  9. String url;
  10. String margin;
  11. String aspectRatio;
  12. String icon;
  13. String img;
  14. String fontColor;
  15. String bgImg;
  16. String bgColor;
  17. String bgColorT;
  18. String badge;
  19. String path;
  20. String data;
  21. int sort;
  22. int isGlobal;
  23. WidgetModel(
  24. {this.modId,
  25. this.modPid,
  26. this.modName,
  27. this.position,
  28. this.skipIdentifier,
  29. this.title,
  30. this.subtitle,
  31. this.url,
  32. this.margin,
  33. this.aspectRatio,
  34. this.icon,
  35. this.img,
  36. this.fontColor,
  37. this.bgImg,
  38. this.bgColor,
  39. this.bgColorT,
  40. this.badge,
  41. this.path,
  42. this.data,
  43. this.sort,
  44. this.isGlobal});
  45. WidgetModel.fromJson(Map<String, dynamic> json) {
  46. modId = json['mod_id'] is int ? json['mod_id'] as int : int.parse(json['mod_id']?.toString());
  47. modPid = json['mod_pid'];
  48. modName = json['mod_name'];
  49. position = json['position'];
  50. skipIdentifier = json['skip_identifier'];
  51. title = json['title'];
  52. subtitle = json['subtitle'];
  53. url = json['url'];
  54. margin = json['margin'];
  55. aspectRatio = json['aspect_ratio'];
  56. icon = json['icon'];
  57. img = json['img'];
  58. fontColor = json['font_color'];
  59. bgImg = json['bg_img'];
  60. bgColor = json['bg_color'];
  61. bgColorT = json['bg_color_t'];
  62. badge = json['badge'];
  63. path = json['path'];
  64. data = json['data'];
  65. sort = json['sort'];
  66. isGlobal = json['is_global'];
  67. }
  68. Map<String, dynamic> toJson() {
  69. final Map<String, dynamic> data = new Map<String, dynamic>();
  70. data['mod_id'] = this.modId;
  71. data['mod_pid'] = this.modPid;
  72. data['mod_name'] = this.modName;
  73. data['position'] = this.position;
  74. data['skip_identifier'] = this.skipIdentifier;
  75. data['title'] = this.title;
  76. data['subtitle'] = this.subtitle;
  77. data['url'] = this.url;
  78. data['margin'] = this.margin;
  79. data['aspect_ratio'] = this.aspectRatio;
  80. data['icon'] = this.icon;
  81. data['img'] = this.img;
  82. data['font_color'] = this.fontColor;
  83. data['bg_img'] = this.bgImg;
  84. data['bg_color'] = this.bgColor;
  85. data['bg_color_t'] = this.bgColorT;
  86. data['badge'] = this.badge;
  87. data['path'] = this.path;
  88. data['data'] = this.data;
  89. data['sort'] = this.sort;
  90. data['is_global'] = this.isGlobal;
  91. return data;
  92. }
  93. }