copyWith method

Settlement copyWith({
  1. String? name,
  2. SettlementType? settlementType,
  3. Race? dominantRace,
  4. List<Location>? locations,
  5. String? description,
  6. String? dominantOccupation,
  7. List<Npc>? importantCharacters,
  8. int? population,
  9. String? trouble,
})

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,
  );
}