class NotificationSettingModel {
  String bgColor;
  String bgStackImg;
  String bgOnStackImg;
  String title;
  String titleColor;
  String subtitle;
  String subtitleColor;
  String listItemTitleColor;
  String listItemSubtitleColor;
  List<NotificationSettingItemModel> list;
  String btnImg;
  String deleteImg;

  NotificationSettingModel(
      {this.bgColor,
        this.bgStackImg,
        this.bgOnStackImg,
        this.title,
        this.titleColor,
        this.subtitle,
        this.subtitleColor,
        this.listItemTitleColor,
        this.listItemSubtitleColor,
        this.list,
        this.btnImg,
        this.deleteImg});

  NotificationSettingModel.fromJson(Map<String, dynamic> json) {
    bgColor = json['bg_color'];
    bgStackImg = json['bg_stack_img'];
    bgOnStackImg = json['bg_on_stack_img'];
    title = json['title'];
    titleColor = json['title_color'];
    subtitle = json['subtitle'];
    subtitleColor = json['subtitle_color'];
    listItemTitleColor = json['list_item_title_color'];
    listItemSubtitleColor = json['list_item_subtitle_color'];
    if (json['list'] != null) {
      list = new List<NotificationSettingItemModel>();
      json['list'].forEach((v) {
        list.add(new NotificationSettingItemModel.fromJson(v));
      });
    }
    btnImg = json['btn_img'];
    deleteImg = json['delete_img'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['bg_color'] = this.bgColor;
    data['bg_stack_img'] = this.bgStackImg;
    data['bg_on_stack_img'] = this.bgOnStackImg;
    data['title'] = this.title;
    data['title_color'] = this.titleColor;
    data['subtitle'] = this.subtitle;
    data['subtitle_color'] = this.subtitleColor;
    data['list_item_title_color'] = this.listItemTitleColor;
    data['list_item_subtitle_color'] = this.listItemSubtitleColor;
    if (this.list != null) {
      data['list'] = this.list.map((v) => v.toJson()).toList();
    }
    data['btn_img'] = this.btnImg;
    data['delete_img'] = this.deleteImg;
    return data;
  }
}

class NotificationSettingItemModel {
  String type;
  String icon;
  String title;
  String subtitle;

  NotificationSettingItemModel({this.type, this.icon, this.title, this.subtitle});

  NotificationSettingItemModel.fromJson(Map<String, dynamic> json) {
    type = json['type'];
    icon = json['icon'];
    title = json['title'];
    subtitle = json['subtitle'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['type'] = this.type;
    data['icon'] = this.icon;
    data['title'] = this.title;
    data['subtitle'] = this.subtitle;
    return data;
  }
}
