paintFront method
Paints the part of the frame in front of the slices.
Implementation
@override
void paintFront(Canvas canvas, WheelFrameGeometry geometry) {
final g = geometry;
final double inner = _inner(g);
final double band = g.outer - inner;
WheelFrame.paintSliceShadow(canvas, g, strength: 0.55);
// The dark ring the tubes are mounted on.
canvas.drawPath(
g.ring(inner, g.outer),
Paint()
..shader = RadialGradient(
colors: [
Color.lerp(plateColor, Colors.white, 0.08)!,
plateColor,
],
stops: [inner / g.outer, 1.0],
).createShader(g.circle(g.outer)),
);
if (band <= 0) return;
_paintTube(canvas, g, inner + band * 0.55, band * 0.22, color);
_paintTube(canvas, g, inner + band * 0.12, band * 0.12, secondaryColor);
}