draw method
- Buffer buffer
override
Draws the widget on the buffer
.
Implementation
@override
void draw(Buffer buffer) {
final area = buffer.area();
final split = area.split(layout);
if (children.length > split.length) {
throw StateError(
'Layout defined ${split.length} sub-areas, but received '
'${children.length} children',
);
}
for (var i = 0; i < split.length; i++) {
final child = children[i];
child.draw(buffer.subGrid(split[i]));
}
}