class WidgetModel {
  int modId;
  int modPid;
  String modName;
  String position;
  String skipIdentifier;
  String title;
  String subtitle;
  String url;
  String margin;
  String aspectRatio;
  String icon;
  String img;
  String fontColor;
  String bgImg;
  String bgColor;
  String bgColorT;
  String badge;
  String path;
  String data;
  int sort;
  int isGlobal;

  WidgetModel(
      {this.modId,
      this.modPid,
      this.modName,
      this.position,
      this.skipIdentifier,
      this.title,
      this.subtitle,
      this.url,
      this.margin,
      this.aspectRatio,
      this.icon,
      this.img,
      this.fontColor,
      this.bgImg,
      this.bgColor,
      this.bgColorT,
      this.badge,
      this.path,
      this.data,
      this.sort,
      this.isGlobal});

  WidgetModel.fromJson(Map<String, dynamic> json) {
    modId = json['mod_id'] is int ? json['mod_id'] as int : int.parse(json['mod_id']?.toString());
    modPid = json['mod_pid'];
    modName = json['mod_name'];
    position = json['position'];
    skipIdentifier = json['skip_identifier'];
    title = json['title'];
    subtitle = json['subtitle'];
    url = json['url'];
    margin = json['margin'];
    aspectRatio = json['aspect_ratio'];
    icon = json['icon'];
    img = json['img'];
    fontColor = json['font_color'];
    bgImg = json['bg_img'];
    bgColor = json['bg_color'];
    bgColorT = json['bg_color_t'];
    badge = json['badge'];
    path = json['path'];
    data = json['data'];
    sort = json['sort'];
    isGlobal = json['is_global'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['mod_id'] = this.modId;
    data['mod_pid'] = this.modPid;
    data['mod_name'] = this.modName;
    data['position'] = this.position;
    data['skip_identifier'] = this.skipIdentifier;
    data['title'] = this.title;
    data['subtitle'] = this.subtitle;
    data['url'] = this.url;
    data['margin'] = this.margin;
    data['aspect_ratio'] = this.aspectRatio;
    data['icon'] = this.icon;
    data['img'] = this.img;
    data['font_color'] = this.fontColor;
    data['bg_img'] = this.bgImg;
    data['bg_color'] = this.bgColor;
    data['bg_color_t'] = this.bgColorT;
    data['badge'] = this.badge;
    data['path'] = this.path;
    data['data'] = this.data;
    data['sort'] = this.sort;
    data['is_global'] = this.isGlobal;
    return data;
  }
}
