copyWith method

Particle copyWith({
  1. ParticleType? particle,
  2. String? texture,
  3. Location? location,
  4. Location? delta,
  5. double? speed,
  6. int? count,
  7. bool? force,
  8. Entity? player,
})

use copyWith to create a new instance with some values changed

Implementation

Particle copyWith({
  ParticleType? particle,
  String? texture,
  Location? location,
  Location? delta,
  double? speed,
  int? count,
  bool? force,
  Entity? player,
}) {
  return Particle(
    particle ?? this.particle,
    texture: texture ?? this.texture,
    location: location ?? this.location,
    delta: delta ?? this.delta,
    speed: speed ?? this.speed,
    count: count ?? this.count,
    force: force ?? this.force,
    player: player ?? this.player,
  );
}