performLayout method
Hook for subclasses to perform layout within the given constraints.
Implementation
@override
Size performLayout(BoxConstraints constraints) {
final sb = widget as SizedBox;
final tightened = constraints.tighten(width: sb.width, height: sb.height);
if (childElement != null) {
final childSize = childElement!.layout(tightened);
childElement!.relativeOffset = Offset.zero;
return childSize;
}
return tightened.constrain(Size.zero);
}