layout method
Lays out this box with the given constraints.
The parentUsesSize parameter indicates whether the parent's layout depends
on this box's size. This affects relayout boundary determination.
Implementation
void layout(LayoutConstraints constraints, {bool parentUsesSize = false}) {
_isRelayoutBoundary =
!parentUsesSize ||
sizedByParent ||
constraints.isTight ||
parent == null;
if (!_needsLayout && constraints == _constraints) {
return;
}
_constraints = constraints;
if (sizedByParent) {
performResize();
}
performLayout();
_needsLayout = false;
}