ParticleConfiguration constructor

const ParticleConfiguration({
  1. required Shape shape,
  2. required Size size,
  3. ParticleColor color = const SingleParticleColor(color: Colors.black),
  4. Effect<AnimatedParticle> postEffectBuilder(
    1. Particle
    )?,
})

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,
});