Add camera and storage permissions, and implement profile picture upload functionality
This commit is contained in:
@@ -78,10 +78,13 @@ class UserModel {
|
||||
/// User's phone number (optional).
|
||||
final String? phoneNumber;
|
||||
|
||||
/// User's profile picture URL (optional).
|
||||
final String? profilePictureUrl;
|
||||
|
||||
/// Creates a new [UserModel] instance.
|
||||
///
|
||||
/// [id], [email], and [prenom] are required fields.
|
||||
/// [nom], [authMethod], and [phoneNumber] are optional and can be null.
|
||||
/// [nom], [authMethod], [phoneNumber], and [profilePictureUrl] are optional and can be null.
|
||||
UserModel({
|
||||
required this.id,
|
||||
required this.email,
|
||||
@@ -89,6 +92,7 @@ class UserModel {
|
||||
this.nom,
|
||||
this.authMethod,
|
||||
this.phoneNumber,
|
||||
this.profilePictureUrl,
|
||||
});
|
||||
|
||||
/// Creates a [UserModel] instance from a JSON map.
|
||||
@@ -103,6 +107,7 @@ class UserModel {
|
||||
nom: json['nom'],
|
||||
authMethod: json['authMethod'] ?? json['platform'],
|
||||
phoneNumber: json['phoneNumber'],
|
||||
profilePictureUrl: json['profilePictureUrl'],
|
||||
);
|
||||
}
|
||||
|
||||
@@ -117,6 +122,7 @@ class UserModel {
|
||||
'nom': nom,
|
||||
'authMethod': authMethod,
|
||||
'phoneNumber': phoneNumber,
|
||||
'profilePictureUrl': profilePictureUrl,
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user