ParticleConfiguration constructor
const
ParticleConfiguration({
- required Shape shape,
- required Size size,
- ParticleColor color = const SingleParticleColor(color: Colors.black),
- Effect<
AnimatedParticle> postEffectBuilder()?,
Creates a ParticleConfiguration
with the specified shape, size, and color.
The shape
parameter is required and represents the shape of the particle, which can be a CircleShape
,
SquareShape
, or ImageShape
.
The size
parameter is required and represents the size of the particle as a Size
object.
The color
parameter is optional and represents the color of the particle. It defaults to Colors.black
.
The postEffectBuilder
parameter is optional and represents the effect to trigger once particle travel is over.
It defaults to null
, that means no effect.
Implementation
const ParticleConfiguration({
required this.shape,
required this.size,
this.color = const SingleParticleColor(color: Colors.black),
this.postEffectBuilder,
});