paint method
Draw itself and its children, according to the calculated
box.offset
Implementation
@override
void paint(Context context) {
super.paint(context);
final canvas = context.canvas;
canvas.saveContext();
if (fillColor != null) {
canvas.setFillColor(fillColor!);
}
if (strokeColor != null) {
canvas.setStrokeColor(strokeColor);
}
canvas.setLineWidth(strokeWidth);
canvas.drawRect(0, 0, box!.width, box!.height);
if (strokeColor != null && fillColor != null) {
canvas.fillAndStrokePath();
} else if (strokeColor != null) {
canvas.strokePath();
} else {
canvas.fillPath();
}
canvas.restoreContext();
}