paint method
Draw itself and its children, according to the calculated
box.offset
Implementation
@override
void paint(Context context) {
super.paint(context);
final mat = Matrix4.identity();
mat.translate(box!.x, box!.y);
context.canvas
..saveContext()
..setTransform(mat);
if (painter != null) {
painter!(context.canvas, box!.size);
}
if (child != null) {
child!.paint(context);
}
if (foregroundPainter != null) {
foregroundPainter!(context.canvas, box!.size);
}
context.canvas.restoreContext();
}