performLayout method
Hook for subclasses to perform layout within the given constraints.
Implementation
@override
Size performLayout(BoxConstraints constraints) {
final win = widget as Window;
final width = win.width;
final height = win.height;
if (childElement != null) {
childElement!.relativeOffset = const Offset(1, 1);
final childW = max(0, width - 2);
final childH = max(0, height - 2);
childElement!.layout(BoxConstraints.tight(Size(childW, childH)));
}
return constraints.constrain(Size(width, height));
}