updateChild method
Adopts a new child, drops the previous one.
Implementation
void updateChild(RenderObject? oldChild, RenderObject? newChild) {
if (oldChild != null) {
dropChild(oldChild);
}
if (newChild != null) {
adoptChild(newChild);
}
}