toJson method
Implementation
Map<String, dynamic> toJson() {
final json = <String, dynamic>{};
json[r'name'] = this.name;
if (this.phoneNumber != null) {
json[r'phone_number'] = this.phoneNumber;
} else {
json[r'phone_number'] = null;
}
if (this.email != null) {
json[r'email'] = this.email;
} else {
json[r'email'] = null;
}
if (this.password != null) {
json[r'password'] = this.password;
} else {
json[r'password'] = null;
}
if (this.agreedToTerms != null) {
json[r'agreed_to_terms'] = this.agreedToTerms;
} else {
json[r'agreed_to_terms'] = null;
}
if (this.dateOfBirth != null) {
json[r'date_of_birth'] = _dateFormatter.format(this.dateOfBirth!.toUtc());
} else {
json[r'date_of_birth'] = null;
}
json[r'verification_code'] = this.verificationCode;
return json;
}