ParticleOptions constructor
const
ParticleOptions({})
Creates a ParticleOptions given a set of preferred values.
Default values are assigned for arguments that are omitted.
Implementation
const ParticleOptions({
this.image,
this.baseColor = Colors.black,
this.spawnMinRadius = 1.0,
this.spawnMaxRadius = 10.0,
this.spawnMinSpeed = 150.0,
this.spawnMaxSpeed = 300.0,
this.spawnOpacity = 0.0,
this.minOpacity = 0.1,
this.maxOpacity = 0.4,
this.opacityChangeRate = 0.25,
this.particleCount = 100,
}) : assert(spawnMaxRadius >= spawnMinRadius),
assert(spawnMinRadius >= 1.0),
assert(spawnMaxRadius >= 1.0),
assert(spawnOpacity >= 0.0),
assert(spawnOpacity <= 1.0),
assert(maxOpacity >= minOpacity),
assert(minOpacity >= 0.0),
assert(minOpacity <= 1.0),
assert(maxOpacity >= 0.0),
assert(maxOpacity <= 1.0),
assert(spawnMaxSpeed >= spawnMinSpeed),
assert(spawnMinSpeed >= 0.0),
assert(spawnMaxSpeed >= 0.0),
assert(particleCount >= 0);