toMap method
It converts the object to a map.
Returns: A map of the user's details.
Implementation
Map<String, dynamic> toMap() {
return <String, dynamic>{
'gender': gender,
'name': name?.toMap(),
'location': location?.toMap(),
'username': username,
'password': password,
'salt': salt,
'md5': md5,
'sha1': sha1,
'sha256': sha256,
'registered': registered,
'dob': dob,
'phone': phone,
'cell': cell,
'PPS': pps,
'picture': picture?.toMap(),
};
}