OpenContacts/lib/models/user_profile.dart

17 lines
314 B
Dart
Raw Normal View History

2023-04-30 07:39:09 -04:00
class UserProfile {
final String iconUrl;
UserProfile({required this.iconUrl});
factory UserProfile.empty() => UserProfile(iconUrl: "");
2023-04-30 07:39:09 -04:00
factory UserProfile.fromMap(Map map) {
2023-04-30 17:14:29 -04:00
return UserProfile(iconUrl: map["iconUrl"] ?? "");
2023-04-30 07:39:09 -04:00
}
2023-04-30 17:14:29 -04:00
Map toMap() {
return {
"iconUrl": iconUrl,
};
2023-04-30 07:39:09 -04:00
}
}