ParticleOptions class
Holds the particle configuration information for a ParticleBehaviour.
Constructors
- ParticleOptions({Image? image, Color baseColor = Colors.black, double spawnMinRadius = 1.0, double spawnMaxRadius = 10.0, double spawnMinSpeed = 150.0, double spawnMaxSpeed = 300.0, double spawnOpacity = 0.0, double minOpacity = 0.1, double maxOpacity = 0.4, double opacityChangeRate = 0.25, int particleCount = 100})
-
Creates a ParticleOptions given a set of preferred values.
const
Properties
- baseColor → Color
-
The color used by the particle. It is mutually exclusive with image.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- image → Image?
-
The image used by the particle. It is mutually exclusive with baseColor.
final
- maxOpacity → double
-
The maximum opacity of a particle. It is used to compute the target
opacity after spawning. Implementation may differ by ParticleBehaviour.
final
- minOpacity → double
-
The minimum opacity of a particle. It is used to compute the target
opacity after spawning. Implementation may differ by ParticleBehaviour.
final
- opacityChangeRate → double
-
The opacity change rate of a particle over its lifetime.
final
- particleCount → int
-
The total count of particles that should be spawned.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- spawnMaxRadius → double
-
The maximum radius of a spawned particle. Changing this value should cause
the particles to update, in case their current radius is bigger than the
new value. The concrete effects depends on the instance of
ParticleBehaviour used.
final
- spawnMaxSpeed → double
-
The maximum speed of a spawned particle. Changing this value should cause
the particles to update, in case their current speed is bigger than the
new value. The concrete effects depends on the instance of
ParticleBehaviour used.
final
- spawnMinRadius → double
-
The minimum radius of a spawned particle. Changing this value should cause
the particles to update, in case their current radius is smaller than the
new value. The concrete effects depends on the instance of
ParticleBehaviour used.
final
- spawnMinSpeed → double
-
The minimum speed of a spawned particle. Changing this value should cause
the particles to update, in case their current speed is smaller than the
new value. The concrete effects depends on the instance of
ParticleBehaviour used.
final
- spawnOpacity → double
-
The opacity of a spawned particle.
final
Methods
-
copyWith(
{Image? image = const _NotSetImage(), Color? baseColor, double? spawnMinRadius, double? spawnMaxRadius, double? spawnMinSpeed, double? spawnMaxSpeed, double? spawnOpacity, double? minOpacity, double? maxOpacity, double? opacityChangeRate, int? particleCount}) → ParticleOptions - Creates a copy of this ParticleOptions but with the given fields replaced with new values.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited