copyWith method

Location copyWith({
  1. String? name,
  2. Npc? owner,
  3. LocationType? type,
  4. String? zone,
  5. List<String>? outsideDescription,
  6. String? buildingDescription,
  7. List<Goods>? goods,
})

Implementation

Location copyWith({
  String? name,
  Npc? owner,
  LocationType? type,
  String? zone,
  List<String>? outsideDescription,
  String? buildingDescription,
  List<Goods>? goods,
}) {
  return Location(
    name: name ?? this.name,
    owner: owner ?? this.owner,
    type: type ?? this.type,
    zone: zone ?? this.zone,
    outsideDescription: outsideDescription ?? this.outsideDescription,
    buildingDescription: buildingDescription ?? this.buildingDescription,
    goods: goods ?? this.goods,
  );
}