RandomParticleBehaviour class
Renders particles that move in a predetermined direction on the AnimatedBackground.
- Inheritance
-
- Object
- Behaviour
- ParticleBehaviour
- RandomParticleBehaviour
Constructors
- RandomParticleBehaviour({ParticleOptions options = const ParticleOptions(), Paint? paint})
- Creates a new random particle behaviour.
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- isInitialized → bool
-
Gets the initialization state of this behaviour
no setterinherited
- options ↔ ParticleOptions
-
Gets the particle options used to configure this behaviour.
getter/setter pairinherited
- particlePaint ↔ Paint?
-
getter/setter pairinherited
-
particles
↔ List<
Particle> ? -
The list of particles used by the particle behaviour to hold the spawned particles.
getter/setter pairinherited
- renderObject ↔ RenderAnimatedBackground?
-
The render object of the AnimatedBackground this behaviour is provided to.
getter/setter pairinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- size → Size?
-
The size of the render object of the AnimatedBackground this behaviour is provided to.
no setterinherited
Methods
-
builder(
BuildContext context, BoxConstraints constraints, Widget child) → Widget -
Called when the layout needs to be rebuilt.
inherited
-
generateParticles(
int numParticles) → List< Particle> -
Generates an amount of particles and initializes them.
inherited
-
init(
) → void -
Called when this behaviour should be initialized
inherited
-
initDirection(
Particle p, double speed) → void - Initializes a new direction for the provided Particle.
-
initFrom(
Behaviour oldBehaviour) → void -
Called when this behaviour should be initialized from an old behaviour.
override
-
initParticle(
Particle p) → void -
override
-
initPosition(
Particle p) → void - Initializes a new position for the provided Particle.
-
initRadius(
Particle p) → void - Initializes a new radius for the provided Particle.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
onOptionsUpdate(
ParticleOptions? oldOptions) → void -
override
-
paint(
PaintingContext context, Offset offset) → void -
Called each time the AnimatedBackground needs to repaint.
inherited
-
tick(
double delta, Duration elapsed) → bool -
Called each time there is an update from the ticker on the AnimatedBackground
inherited
-
toString(
) → String -
A string representation of this object.
inherited
-
updateParticle(
Particle particle, double delta, Duration elapsed) → void -
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited