toJson method

Map<String, dynamic> toJson()

Implementation

Map<String, dynamic> toJson() {
  final Map<String, dynamic> data = new Map<String, dynamic>();
  data['age'] = this.age;
  data['attenCnt'] = this.attenCnt;
  data['bgImg'] = this.bgImg;
  data['birthday'] = this.birthday;
  data['emotion'] = this.emotion;
  data['emotionStr'] = this.emotionStr;
  data['fansCnt'] = this.fansCnt;
  data['gender'] = this.gender;
  data['homeCity'] = this.homeCity;
  data['homeCityStr'] = this.homeCityStr;
  data['homeProvince'] = this.homeProvince;
  data['homeProvinceStr'] = this.homeProvinceStr;
  data['job'] = this.job;
  data['jobStr'] = this.jobStr;
  data['levelIcon'] = this.levelIcon;
  data['myInviteCode'] = this.myInviteCode;
  data['accountType'] = this.accountType;
  data['anchorLevel'] = this.anchorLevel;
  data['hasAtten'] = this.hasAtten;

  if (this.list != null) {
    data['list'] = this.list?.map((v) => v.toJson()).toList();
  }
  data['personalSign'] = this.personalSign;
  data['userIcon'] = this.userIcon;
  data['userId'] = this.userId;
  data['userLevel'] = this.userLevel;
  data['userName'] = this.userName;
  data['nobilityType'] = this.nobilityType ?? 0;
  return data;
}