ParticlePainter constructor

ParticlePainter(
  1. Listenable? repaint, {
  2. required List<Particle> particles,
  3. bool paintEmitterTarget = true,
  4. Color emitterTargetColor = Colors.black,
  5. Color strokeColor = Colors.black,
  6. double strokeWidth = 0,
})

Implementation

ParticlePainter(
  Listenable? repaint, {
  required this.particles,
  bool paintEmitterTarget = true,
  Color emitterTargetColor = Colors.black,
  Color strokeColor = Colors.black,
  this.strokeWidth = 0,
})  : _paintEmitterTarget = paintEmitterTarget,
      _emitterPaint = Paint()
        ..color = emitterTargetColor
        ..style = PaintingStyle.stroke
        ..strokeWidth = 2.0,
      _particlePaint = Paint()
        ..color = Colors.green
        ..style = PaintingStyle.fill,
      _particleStrokePaint = Paint()
        ..color = strokeColor
        ..strokeWidth = strokeWidth
        ..style = PaintingStyle.stroke,
      super(repaint: repaint);