render method
Implementation
void render(Canvas canvas) {
_backgroundRect?.let((background) {
if (_backgroundSprite != null) {
_backgroundSprite?.renderRect(
canvas,
background,
);
} else {
_paintBackground?.let((paintBg) {
double radiusBackground = background.width / 2;
canvas.drawCircle(
Offset(background.left + radiusBackground,
background.top + radiusBackground),
radiusBackground,
paintBg,
);
});
}
});
_knobRect?.let((knobRect) {
if (_knobSprite != null) {
_knobSprite?.renderRect(canvas, knobRect);
} else {
_paintKnob?.let((paintKnob) {
double radiusKnob = knobRect.width / 2;
canvas.drawCircle(
Offset(
knobRect.left + radiusKnob,
knobRect.top + radiusKnob,
),
radiusKnob,
paintKnob,
);
});
}
});
}