setChild method
Replace this object's single render child.
Implementations must be idempotent: passing the current child or a render object that is already adopted as a child of this parent must be a no-op.
Implementation
@override
void setChild(RenderObject? child) {
if (child != null && child is! RenderBox) {
throw ArgumentError(
'RenderProxyBox children must be RenderBox, got ${child.runtimeType}',
);
}
this.child = child as RenderBox?;
}