Add camera and storage permissions, and implement profile picture upload functionality

This commit is contained in:
Van Leemput Dayron
2025-11-13 15:33:43 +01:00
parent 2ca30088ca
commit 3560b2d6f5
4 changed files with 327 additions and 57 deletions

View File

@@ -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,
};
}
}