toMap method
Implementation
Map<String, dynamic> toMap() {
Map<String, dynamic> data = {
"userId": userId,
"name": name,
"gender": gender,
"email": email,
"phone": phone,
"country": country,
"city": city,
"firebaseToken": deviceToken,
};
if (age > 0) {
data["age"] = age;
}
print("user to map $data");
return data;
}