copyWith method

Top copyWith({
  1. TopType? topType,
  2. AccessoriesType? accessoriesType,
  3. HatColor? hatColor,
  4. HairColor? hairColor,
  5. FacialHair? facialHair,
})

Implementation

Top copyWith({
  TopType? topType,
  AccessoriesType? accessoriesType,
  HatColor? hatColor,
  HairColor? hairColor,
  FacialHair? facialHair,
}) {
  return Top(
    topType: topType ?? this.topType,
    accessoriesType: accessoriesType ?? this.accessoriesType,
    hatColor: hatColor ?? this.hatColor,
    hairColor: hairColor ?? this.hairColor,
    facialHair: facialHair ?? this.facialHair,
  );
}