render method
void
render()
override
Renders this element at the given projected screen position.
Implementation
@override
void render(
Canvas canvas,
double screenX,
double screenY,
double depth,
double scale,
) {
final r = radius * scale;
final center = Offset(screenX, screenY);
// Glow
if (glowRadius > 0) {
canvas.drawCircle(
center,
(radius + glowRadius) * scale,
Paint()
..color = color.withValues(alpha: 0.2)
..maskFilter = MaskFilter.blur(BlurStyle.normal, glowRadius * scale),
);
}
// Core
canvas.drawCircle(center, r, Paint()..color = color);
// Bright center
canvas.drawCircle(
center,
r * 0.4,
Paint()..color = const Color(0xFFFFFFFF),
);
}