layout method

void layout(
  1. Constraints constraints, {
  2. bool parentUsesSize = true,
})

Implementation

void layout(Constraints constraints, {bool parentUsesSize = true}) {
  if (!_needsLayout && _constraints == constraints) return;
  _constraints = constraints;
  performLayout(constraints);
  _needsLayout = false;
  _needsPaint = true;

  if (parentUsesSize && _parent != null && !_relayoutBoundary) {
    _parent!._needsLayout = true;
    _parent!._needsPaint = true;
  }
}