draw method
Calls the given render
function with a buffer for drawing.
If bounds
is not provided it defaults to the entire frame.
Implementation
void draw(void Function(Buffer) render, [Rect? bounds]) {
var buffer = _buffer;
if (bounds != null) {
buffer = buffer.subGrid(bounds);
}
render(buffer);
}