BaseFx class abstract
- Mixed-in types
- Implementers
Constructors
- BaseFx({required Size size, int numParticles = 5000, ParticleShapeType shape = ParticleShapeType.circle})
Properties
- center ↔ Offset
-
The center of the canvas.
getter/setter pair
- hashCode → int
-
The hash code for this object.
no setterinherited
- hasListeners → bool
-
Whether any listeners are currently registered.
no setterinherited
- height ↔ double
-
The available canvas height for the FX.
getter/setter pair
- numParticles ↔ int
-
The maximum number of particles.
getter/setter pair
- palette ↔ Palette?
-
The colors used for painting.
getter/setter pair
- particleMaxSize ↔ double
-
getter/setter pair
- particleMinSize ↔ double
-
Size of particle
getter/setter pair
-
particles
↔ List<
Particle?> -
All the FX's particles.
getter/setter pair
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- shape ↔ ParticleShapeType
-
getter/setter pair
- sizeMin ↔ double
-
The minimum value of width and height.
getter/setter pair
- spawnArea ↔ Rect
-
The area from wich to spawn new particles.
getter/setter pair
- vx ↔ double
-
Velocity of particle
getter/setter pair
- vy ↔ double
-
getter/setter pair
- width ↔ double
-
The available canvas width for the FX.
getter/setter pair
Methods
-
addListener(
VoidCallback listener) → void -
Register a closure to be called when the object changes.
inherited
-
dispose(
) → void -
Discards any resources used by the object. After this is called, the
object is not in a usable state and should be discarded (calls to
addListener will throw after the object is disposed).
inherited
-
init(
) → void - Initializes the particle effect by resetting all the particles and assigning a random color from the palette.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
notifyListeners(
) → void -
Call all the registered listeners.
inherited
-
removeListener(
VoidCallback listener) → void -
Remove a previously registered closure from the list of closures that are
notified when the object changes.
inherited
-
resetParticle(
int i) → Particle - Resets a particle's values.
-
setPalette(
Palette palette) → void - Sets the palette used for coloring.
-
setParticleCount(
int count) → void -
setParticleSize(
double min, double max) → void -
setShape(
ParticleShapeType shape) → void -
setSize(
Size size) → void - Sets the canvas size and updates dependent values.
-
setVelocity(
double vx, double vy) → void -
tick(
Duration duration) → void -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Constants
- baseParticleMaxSize → const double
- baseParticleMinSize → const double
- baseVelocity → const double