updateChild method

void updateChild(
  1. RenderObject? oldChild,
  2. RenderObject? newChild
)

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);
  }
}