copyWith method
Kingdom
copyWith({
- String? name,
- KingdomType? kingdomType,
- List<
Npc> ? rulers, - Race? race,
- int? population,
- Settlement? capital,
- List<
Settlement> ? importantSettlements, - GovernmentType? governmentType,
- Emblem? emblem,
- String? knownFor,
- String? history,
- List<
Guild> ? guilds, - String? trouble,
- List<
Holiday> ? holidays,
Implementation
Kingdom copyWith({
String? name,
KingdomType? kingdomType,
List<Npc>? rulers,
Race? race,
int? population,
Settlement? capital,
List<Settlement>? importantSettlements,
GovernmentType? governmentType,
Emblem? emblem,
String? knownFor,
String? history,
List<Guild>? guilds,
String? trouble,
List<Holiday>? holidays,
}) {
return Kingdom(
name: name ?? this.name,
kingdomType: kingdomType ?? this.kingdomType,
rulers: rulers ?? this.rulers,
race: race ?? this.race,
population: population ?? this.population,
capital: capital ?? this.capital,
importantSettlements: importantSettlements ?? this.importantSettlements,
governmentType: governmentType ?? this.governmentType,
emblem: emblem ?? this.emblem,
knownFor: knownFor ?? this.knownFor,
history: history ?? this.history,
guilds: guilds ?? this.guilds,
trouble: trouble ?? this.trouble,
holidays: holidays ?? this.holidays,
);
}