layout method

void layout(
  1. BoxConstraints constraints, [
  2. BuildOwner? owner
])

Resolves the layout of the embedded widget tree.

Implementation

void layout(BoxConstraints constraints, [BuildOwner? owner]) {
  if (internalElement == null) {
    internalElement = child.createElement();
    if (owner != null) {
      internalElement!.owner = owner;
    }
    internalElement!.mount(null);
  } else {
    internalElement!.update(child);
  }
  internalElement!.layout(constraints);
}