performLayout method
Called to perform the actual layout computation for this render object.
Implementation
@override
void performLayout(Constraints constraints) {
final boxConstraints = constraints.asBoxConstraints;
final totalMargin = margin ?? const EdgeInsets.all(0);
final totalPadding = padding ?? const EdgeInsets.all(0);
int containerW = _width ?? boxConstraints.maxWidth;
int containerH = _height ?? LayoutConstants.defaultContainerHeight;
if (child != null) {
final resolved = _layoutChild(containerW, containerH, totalPadding);
containerW = resolved.$1;
containerH = resolved.$2;
}
size = Size(
containerW + totalMargin.left + totalMargin.right,
containerH + totalMargin.top + totalMargin.bottom,
);
}