adoptChild method
Add a child to this render object
Implementation
void adoptChild(RenderObject child) {
assert(
child.parent == null,
'Child ${child.runtimeType} already has parent '
'${child.parent.runtimeType}',
);
child.parent = this;
children.add(child);
final owner = _pipelineOwner;
if (owner != null) {
child.attach(owner);
}
markNeedsLayout();
}