copyWith method
Implementation
UserProfileModel copyWith({
String? id,
String? username,
String? email,
String? bio,
String? avatarUrl,
UserRole? role,
AccountVerificationStatus? verificationStatus,
DateTime? createdAt,
DateTime? updatedAt,
}) {
return UserProfileModel(
id: id ?? this.id,
username: username ?? this.username,
email: email ?? this.email,
bio: bio ?? this.bio,
avatarUrl: avatarUrl ?? this.avatarUrl,
role: role ?? this.role,
verificationStatus: verificationStatus ?? this.verificationStatus,
createdAt: createdAt ?? this.createdAt,
updatedAt: updatedAt ?? this.updatedAt,
);
}