toMap method
Converts the User instance into a Map.
This is useful for serialization purposes.
Implementation
Map<String, dynamic> toMap() {
final map = <String, dynamic>{
'ID': ID,
'userName': userName,
};
if (hashedPassword != null) {
map['hashedPassword'] = hashedPassword;
}
return map;
}