Modifs MVVM
This commit is contained in:
@ -41,4 +41,23 @@ class UserModel {
|
||||
'phoneNumber': phoneNumber,
|
||||
};
|
||||
}
|
||||
|
||||
UserModel copyWith({
|
||||
String? firstName,
|
||||
String? lastName,
|
||||
String? role,
|
||||
String? profilePhotoUrl,
|
||||
String? email,
|
||||
String? phoneNumber,
|
||||
}) {
|
||||
return UserModel(
|
||||
uid: uid, // L'UID ne change pas
|
||||
firstName: firstName ?? this.firstName,
|
||||
lastName: lastName ?? this.lastName,
|
||||
role: role ?? this.role,
|
||||
profilePhotoUrl: profilePhotoUrl ?? this.profilePhotoUrl,
|
||||
email: email ?? this.email,
|
||||
phoneNumber: phoneNumber ?? this.phoneNumber,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user