copyWith method

ScatterTouchedSpot copyWith({
  1. ScatterSpot? spot,
  2. int? spotIndex,
})

Copies current ScatterTouchedSpot to a new ScatterTouchedSpot, and replaces provided values.

Implementation

ScatterTouchedSpot copyWith({
  ScatterSpot? spot,
  int? spotIndex,
}) {
  return ScatterTouchedSpot(spot ?? this.spot, spotIndex ?? this.spotIndex);
}