copyWith method

Kingdom copyWith({
  1. String? name,
  2. KingdomType? kingdomType,
  3. List<Npc>? rulers,
  4. Race? race,
  5. int? population,
  6. Settlement? capital,
  7. List<Settlement>? importantSettlements,
  8. GovernmentType? governmentType,
  9. Emblem? emblem,
  10. String? knownFor,
  11. String? history,
  12. List<Guild>? guilds,
  13. String? trouble,
  14. 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,
  );
}