in packages/core/src/rendering/render-object.ts [722:752]
layoutAsChild(parentUsesSize: boolean, force: boolean) {
if (this._hidden) {
this._layoutDirty = false
return
}
if (this._layoutDirty || force) {
let relayoutBoundary: RenderObject | undefined
if (!this.parent || !parentUsesSize) {
// eslint-disable-next-line @typescript-eslint/no-this-alias
relayoutBoundary = this
} else {
relayoutBoundary = this.parent._relayoutBoundary
}
if (this._relayoutBoundary !== undefined && this._relayoutBoundary !== relayoutBoundary) {
this.visitChildren(RenderObject.cleanChildRelayoutBoundary)
}
this._relayoutBoundary = relayoutBoundary
try {
this.performLayout()
} catch (err) {
console.error(err)
}
this._layoutDirty = false
this.markPaintDirty()
}
}