MovingParticle class

Statically offset given child Particle by given Offset If you're loking to move the child, consider MovingParticle

Mixed in types


MovingParticle({@required Particle child, @required Offset to, Offset from =, double lifespan, Curve curve = Curves.linear})


child Particle
read / write, override
curve Curve
final, inherited
from Offset
hashCode int
The hash code for this object. [...]
read-only, inherited
progress double
Getter which should be used by subclasses to get overall progress. Also allows to substitute progres with other values, for example adding easing as in CurvedParticle.
read-only, inherited
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited
to Offset


accelerated({Offset acceleration =, Offset position =, Offset speed =}) Particle
Wraps this particle with AcceleratedParticle allowing to specify desired position speed and acceleration and leave the basic physics do the rest.
asComponent() Component
Wraps this particle with ParticleComponent to be used within the BaseGame component system.
destroy() bool
This method will return true as soon as particle reaches an end of its lifespan, which means it's ready to be destroyed by a wrapping container. Follows same style as Component.
moving({Offset from =, Offset to, Curve curve = Curves.linear}) Particle
Wraps this particle with MovingParticle allowing it to move from one Offset on the canvas to another one.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
render(Canvas c) → void
Should render this Particle to given Canvas. Default behavior is empty, so that it's not required to override this in Particle which render nothing and serve as behavior containers.
rotated([double angle = 0]) Particle
Rotates this particle to a fixed angle in radians with RotatingParticle
rotating({double from = 0, double to = pi}) Particle
Rotates this particle from given angle to another one in radians with RotatingParticle
scaled(double scale) Particle
Wraps this particle with ScaledParticle allowing to change size of it and/or its children
setLifespan(double lifespan) → void
A control method allowing a parent of this Particle to pass down it's lifespan. Allows to only specify desired lifespan once, at the very top of the Particle tree which then will be propagated down using this method. See SingleChildParticle or ComposedParticle for details.
toString() String
A string representation of this object. [...]
translated(Offset offset) Particle
Wtaps this particle with TranslatedParticle statically repositioning it for the time of the lifespan.
update(double t) → void
Updates internal Timer of this Particle which defines its position on the lifespan. Marks Particle for destroy when it is over.


operator ==(Object other) bool
The equality operator. [...]