toJson method

Map<String, dynamic> toJson()

Implementation

Map<String, dynamic> toJson() {
  final json = <String, dynamic>{};
  if (this.firstName != null) {
    json[r'firstName'] = this.firstName;
  } else {
    json[r'firstName'] = null;
  }
  if (this.lastName != null) {
    json[r'lastName'] = this.lastName;
  } else {
    json[r'lastName'] = null;
  }
  if (this.dateOfBirth != null) {
    json[r'dateOfBirth'] = _dateFormatter.format(this.dateOfBirth!.toUtc());
  } else {
    json[r'dateOfBirth'] = null;
  }
  if (this.gender != null) {
    json[r'gender'] = this.gender;
  } else {
    json[r'gender'] = null;
  }
  if (this.maritalStatus != null) {
    json[r'maritalStatus'] = this.maritalStatus;
  } else {
    json[r'maritalStatus'] = null;
  }
  if (this.employmentStatus != null) {
    json[r'employmentStatus'] = this.employmentStatus;
  } else {
    json[r'employmentStatus'] = null;
  }
  if (this.educationLevel != null) {
    json[r'educationLevel'] = this.educationLevel;
  } else {
    json[r'educationLevel'] = null;
  }
  if (this.relationship != null) {
    json[r'relationship'] = this.relationship;
  } else {
    json[r'relationship'] = null;
  }
  return json;
}