toJson method

Map<String, dynamic> toJson()

Implementation

Map<String, dynamic> toJson() {
  final map = <String, dynamic>{};
  map['middleName'] = middleName;
  map['birthdate'] =  birthdate == null ? "" : DateFormat("yyyy-MM-dd").format(birthdate!);
  map['address2'] = address2;
  map['state'] = state;
  return map;
}