copyWith method
User
copyWith(
{ - String? id,
- String? name,
- int? age,
- List<String>? tags,
- Set<int>? scores,
- Map<String, String>? metadata,
- Set<String>? tagsSet,
- Map<String, int>? stats,
})
Implementation
User copyWith({
String? id,
String? name,
int? age,
List<String>? tags,
Set<int>? scores,
Map<String, String>? metadata,
Set<String>? tagsSet,
Map<String, int>? stats,
}) {
return User(
id: id ?? this.id,
name: name ?? this.name,
age: age ?? this.age,
tags: tags ?? this.tags,
scores: scores ?? this.scores,
metadata: metadata ?? this.metadata,
tagsSet: tagsSet ?? this.tagsSet,
stats: stats ?? this.stats,
);
}