copyWith method
Creates a copy of this User with the given fields replaced
Implementation
User copyWith({
String? id,
String? name,
DateTime? createdAt,
}) {
return User(
id: id ?? this.id,
name: name ?? this.name,
createdAt: createdAt ?? this.createdAt,
);
}