copyWith method

User copyWith({
  1. String? uuid,
  2. String? username,
  3. String? email,
  4. bool? emailVerified,
  5. String? avatarStorageUUID,
  6. UserRole? role,
})

Implementation

User copyWith({
  String? uuid,
  String? username,
  String? email,
  bool? emailVerified,
  String? avatarStorageUUID,
  UserRole? role,
}) {
  return User(
    uuid: uuid ?? this.uuid,
    username: username ?? this.username,
    email: email ?? this.email,
    emailVerified: emailVerified ?? this.emailVerified,
    avatarStorageUUID: avatarStorageUUID ?? this.avatarStorageUUID,
    role: role ?? this.role,
  );
}