copyWith method

Npc copyWith({
  1. String? name,
  2. int? age,
  3. Gender? gender,
  4. Race? race,
  5. String? occupation,
  6. PhysicalDescription? physicalDescription,
  7. Personality? personality,
  8. String? goal,
  9. List<Companion>? companions,
})

Implementation

Npc copyWith({
  String? name,
  int? age,
  Gender? gender,
  Race? race,
  String? occupation,
  PhysicalDescription? physicalDescription,
  Personality? personality,
  String? goal,
  List<Companion>? companions,
}) {
  return Npc(
    name: name ?? this.name,
    age: age ?? this.age,
    gender: gender ?? this.gender,
    race: race ?? this.race,
    occupation: occupation ?? this.occupation,
    physicalDescription: physicalDescription ?? this.physicalDescription,
    personality: personality ?? this.personality,
    goal: goal ?? this.goal,
    companions: companions ?? this.companions,
  );
}