OvoidalParticle class

Single Ovoidal Particle

Inheritance

Constructors

OvoidalParticle({required double height, required double width, required Color color, required Offset velocity, double rotationSpeed = 0, double? lifetime, Color? endColor, List<Color>? colorGradient, Curve colorCurve = const Cubic(0, 0, 1, 1), double startScale = 1.0, double? endScale, Curve scaleCurve = const Cubic(0, 0, 1, 1), double startOpacity = 1.0, double? endOpacity, Curve opacityCurve = const Cubic(0, 0, 1, 1), bool trailEnabled = false, int trailLength = 10, bool trailFade = true})

Properties

age double
no setterinherited
color Color
Define the color of a single particle.
finalinherited
colorCurve Curve
finalinherited
colorGradient List<Color>?
finalinherited
currentVelocity Offset
no setterinherited
endColor Color?
finalinherited
endOpacity double?
finalinherited
endScale double?
finalinherited
hashCode int
The hash code for this object.
no setterinherited
height double
Define the height of the ovoidal particle
final
isExpired bool
no setterinherited
lifetime double?
Duration in seconds before the particle expires. null = infinite.
finalinherited
lifetimeProgress double
no setterinherited
opacityCurve Curve
finalinherited
paintColor Color
no setterinherited
position Offset
no setterinherited
rotation double
no setterinherited
rotationSpeed double
Define the rotation speed of a single particle.
finalinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
scaleCurve Curve
finalinherited
startOpacity double
finalinherited
startScale double
finalinherited
trailCount int
no setterinherited
trailEnabled bool
finalinherited
trailFade bool
finalinherited
trailLength int
finalinherited
updateAge double
no getterinherited
updateCurrentColor Color
no getterinherited
updateCurrentOpacity double
no getterinherited
updateCurrentScale double
no getterinherited
updatePosition Offset
no getterinherited
updateRotation double
no getterinherited
updateVelocity Offset
no getterinherited
velocity Offset
Define the direction and speed of a single particle.
finalinherited
width double
Define the width of the ovoidal particle
final

Methods

drawParticle(Canvas canvas, Size size) → void
Allow subclasses to define their own draw method
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
paint(Canvas canvas, Size size) → void
inherited
pushTrailPosition(Offset pos) → void
inherited
resetLifetimeState() → void
Resets lifetime-driven runtime state (color/scale/opacity/trail) back to start values. Used when a pooled particle slot is reused for a new burst.
inherited
rotate(Canvas canvas, double cx, double cy) → void
inherited
toString() String
A string representation of this object.
inherited
trailPositionAt(int i) Offset
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited