toJson method

Map<String, dynamic> toJson()

Implementation

Map<String, dynamic> toJson() {
  final Map<String, dynamic> data = new Map<String, dynamic>();
  if (this.nickName != null) data['nickName'] = this.nickName;
  if (this.faceUrl != null) data['faceUrl'] = this.faceUrl;
  if (this.selfSignature != null) data['selfSignature'] = this.selfSignature;
  if (this.gender != null)
    data['gender'] = UserGenderTool.toInt(this.gender!);
  if (this.role != null) data['role'] = this.role;
  if (this.level != null) data['level'] = this.level;
  if (this.allowType != null)
    data['allowType'] = UserAllowTypeTool.toInt(this.allowType!);
  if (this.customInfo != null) data['customInfo'] = this.customInfo;
  return data;
}