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

  WalletHeaderModel(
      {this.headerImg,
        this.headerAvatar,
        this.headerCashOutText,
        this.headerCashOutTextColor,
        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'];
    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_btn_img'] = this.headerCashOutBtnImg;
    if (this.headerBottomList != null) {
      data['header_bottom_list'] =
          this.headerBottomList.map((v) => v.toJson()).toList();
    }
    return data;
  }
}

class HeaderBottomList {
  String totalText;
  String totalTextColor;
  String totalValueColor;
  String cashOutText;
  String cashOutTextColor;
  String cashOutValueColor;
  String unfinalText;
  String unfinalTextColor;
  String unfinalValueColor;

  HeaderBottomList(
      {this.totalText,
        this.totalTextColor,
        this.totalValueColor,
        this.cashOutText,
        this.cashOutTextColor,
        this.cashOutValueColor,
        this.unfinalText,
        this.unfinalTextColor,
        this.unfinalValueColor});

  HeaderBottomList.fromJson(Map<String, dynamic> json) {
    totalText = json['total_text'];
    totalTextColor = json['total_text_color'];
    totalValueColor = json['total_value_color'];
    cashOutText = json['cash_out_text'];
    cashOutTextColor = json['cash_out_text_color'];
    cashOutValueColor = json['cash_out_value_color'];
    unfinalText = json['unfinal_text'];
    unfinalTextColor = json['unfinal_text_color'];
    unfinalValueColor = json['unfinal_value_color'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['total_text'] = this.totalText;
    data['total_text_color'] = this.totalTextColor;
    data['total_value_color'] = this.totalValueColor;
    data['cash_out_text'] = this.cashOutText;
    data['cash_out_text_color'] = this.cashOutTextColor;
    data['cash_out_value_color'] = this.cashOutValueColor;
    data['unfinal_text'] = this.unfinalText;
    data['unfinal_text_color'] = this.unfinalTextColor;
    data['unfinal_value_color'] = this.unfinalValueColor;
    return data;
  }
}
