render method
Renders the widget onto the provided buffer within the specified area.
Implementation
@override
void render(Buffer buffer, Rect area) {
final clampedWidth = area.width.clamp(
constraints.minWidth,
constraints.maxWidth,
);
final clampedHeight = area.height.clamp(
constraints.minHeight,
constraints.maxHeight,
);
if (clampedWidth <= 0 || clampedHeight <= 0) return;
final childArea = Rect(area.x, area.y, clampedWidth, clampedHeight);
final viewport = Viewport(buffer, childArea);
child.render(viewport, Rect(0, 0, clampedWidth, clampedHeight));
}