import 'package:zhiying_base_widget/widgets/share/models/share_icon_model.dart';

class ShareAlertModel {
  List<ShareIconModel> icons;
  String selectIcon;
  String selectImg;
  String selectTextImg;
  String successImg;
  String sucText;
  String sucTips;
  String selectText1;
  String selectText2;

  ShareAlertModel(
      {this.icons,
      this.selectIcon,
      this.selectImg,
      this.selectTextImg,
      this.successImg,
      this.sucText,
      this.sucTips,
      this.selectText1,
      this.selectText2});

  ShareAlertModel.fromJson(Map<String, dynamic> json) {
    if (json['list'] != null) {
      icons = new List<ShareIconModel>();
      json['list'].forEach((v) {
        icons.add(new ShareIconModel.fromJson(v));
      });
    }
    selectIcon = json['select_icon'];
    selectImg = json['select_img'];
    selectTextImg = json['select_text_img'];
    successImg = json['success_img'];
    sucText = json['suc_text'];
    sucTips = json['suc_tips'];
    selectText1 = json['select_text1'];
    selectText2 = json['select_text2'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    if (this.icons != null) {
      data['list'] = this.icons.map((v) => v.toJson()).toList();
    }
    data['select_icon'] = this.selectIcon;
    data['select_img'] = this.selectImg;
    data['select_text_img'] = this.selectTextImg;
    data['success_img'] = this.successImg;
    data['suc_text'] = this.sucText;
    data['suc_tips'] = this.sucTips;
    data['select_text1'] = this.selectText1;
    data['select_text2'] = this.selectText2;
    return data;
  }
}
