setChild method
Set the child render object. Idempotent: passing the current child or one already adopted as this object's child is a no-op.
Implementation
@override
void setChild(RenderObject? newChild) {
if (newChild != null && newChild is! RenderBox) {
throw ArgumentError(
'RenderPadding children must be RenderBox, '
'got ${newChild.runtimeType}',
);
}
final next = newChild as RenderBox?;
_child = updateChild(_child, next) as RenderBox?;
}