copyWith method
UserPublic
copyWith({})
Creates a copy of the user with updated fields
Implementation
UserPublic copyWith({
String? userId,
String? mail,
String? firstname,
String? lastname,
Phone? phone,
Timestamp? lastSignIn,
UserPermissions? permissions,
Map<String, String>? othersAttributes,
}) {
return UserPublic()
..userId = userId ?? this.userId
..mail = mail ?? this.mail
..firstname = firstname ?? this.firstname
..lastname = lastname ?? this.lastname
..phone = phone ?? this.phone
..lastSignIn = lastSignIn ?? this.lastSignIn
..permissions = permissions ?? this.permissions
..othersAttributes.addAll(othersAttributes ?? this.othersAttributes);
}