toJson method
Implementation
Map<String, dynamic> toJson() {
return {
'id': id,
'phoneNumber': phoneNumber,
'password': password,
'name': name,
'photo': photo,
'apiKey': apiKey,
'location': location?.toJson(),
'notificationToken': notificationToken,
'country': country?.value,
'createdAt': createdAt.toIso8601String(),
};
}