copyWith method
Implementation
Settlement copyWith({
String? name,
SettlementType? settlementType,
Race? dominantRace,
List<Location>? locations,
String? description,
String? dominantOccupation,
List<Npc>? importantCharacters,
int? population,
String? trouble,
}) {
return Settlement(
name: name ?? this.name,
settlementType: settlementType ?? this.settlementType,
dominantRace: dominantRace ?? this.dominantRace,
locations: locations ?? this.locations,
description: description ?? this.description,
dominantOccupation: dominantOccupation ?? this.dominantOccupation,
importantCharacters: importantCharacters ?? this.importantCharacters,
population: population ?? this.population,
trouble: trouble ?? this.trouble,
);
}