Glitter class
Import the ParticleShape enum for particle rendering options Represents a glitter particle with position, size, speed, color, and lifespan.
Constructors
Properties
- color ↔ Color
-
Vertical speed of the particle.
getter/setter pair
- hashCode → int
-
The hash code for this object.
no setterinherited
- lifespan ↔ double
-
Color of the particle.
getter/setter pair
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- size ↔ double
-
Y-coordinate of the particle's current position.
getter/setter pair
- speedX ↔ double
-
Diameter of the particle.
getter/setter pair
- speedY ↔ double
-
Horizontal speed of the particle.
getter/setter pair
- x ↔ double
-
getter/setter pair
- y ↔ double
-
X-coordinate of the particle's current position.
getter/setter pair
Methods
-
draw(
Canvas canvas, ParticleShape shape) → void -
Draws the particle on the canvas based on its current shape
shape
. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
-
update(
bool applyGravity) → void - Picks a random color from provided colors if isRandomColor is false. Updates the position and size of the particle.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited