paint method
Paints the particle at the given position along the connection path.
Parameters:
canvas: The canvas to draw onposition: The center position of the particletangent: The path tangent at this position (for directional particles)basePaint: The base paint from the connection (color, style, etc.)
Implementation
@override
void paint(Canvas canvas, Offset position, Tangent tangent, Paint basePaint) {
final particlePaint = Paint()
..color = color ?? basePaint.color
..style = PaintingStyle.fill;
canvas.drawCircle(position, radius, particlePaint);
}