performLayout method
Hook for subclasses to perform layout within the given constraints.
Implementation
@override
Size performLayout(BoxConstraints constraints) {
final cb = widget as ConstrainedBox;
final childConstraints = constraints.enforce(cb.constraints);
if (childElement != null) {
final size = childElement!.layout(childConstraints);
childElement!.relativeOffset = Offset.zero;
return size;
}
return childConstraints.constrain(Size.zero);
}