class WalletHeaderModel {
  String headerImg;
  String headerAvatar;
  String headerCashOutText;
  String headerCashOutTextColor;
  String headerCashOutKey;
  String headerCashOutBtnImg;
  List<HeaderBottomList> headerBottomList;

  WalletHeaderModel(
      {this.headerImg,
        this.headerAvatar,
        this.headerCashOutText,
        this.headerCashOutTextColor,
        this.headerCashOutKey,
        this.headerCashOutBtnImg,
        this.headerBottomList});

  WalletHeaderModel.fromJson(Map<String, dynamic> json) {
    headerImg = json['header_img'];
    headerAvatar = json['header_avatar'];
    headerCashOutText = json['header_cash_out_text'];
    headerCashOutTextColor = json['header_cash_out_text_color'];
    headerCashOutKey = json['header_cash_out_key'];
    headerCashOutBtnImg = json['header_cash_out_btn_img'];
    if (json['header_bottom_list'] != null) {
      headerBottomList = new List<HeaderBottomList>();
      json['header_bottom_list'].forEach((v) {
        headerBottomList.add(new HeaderBottomList.fromJson(v));
      });
    }
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['header_img'] = this.headerImg;
    data['header_avatar'] = this.headerAvatar;
    data['header_cash_out_text'] = this.headerCashOutText;
    data['header_cash_out_text_color'] = this.headerCashOutTextColor;
    data['header_cash_out_key'] = this.headerCashOutKey;
    data['header_cash_out_btn_img'] = this.headerCashOutBtnImg;
    if (this.headerBottomList != null) {
      data['header_bottom_list'] =
          this.headerBottomList.map((v) => v.toJson()).toList();
    }
    return data;
  }
}

class HeaderBottomList {
  String text;
  String textColor;
  String valueColor;
  String valueKey;

  HeaderBottomList({this.text, this.textColor, this.valueColor, this.valueKey});

  HeaderBottomList.fromJson(Map<String, dynamic> json) {
    text = json['text'];
    textColor = json['text_color'];
    valueColor = json['value_color'];
    valueKey = json['value_key'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['text'] = this.text;
    data['text_color'] = this.textColor;
    data['value_color'] = this.valueColor;
    data['value_key'] = this.valueKey;
    return data;
  }
}
