removeChild method

void removeChild(
  1. DomRenderObject child
)

Implementation

void removeChild(DomRenderObject child) {
  if (child case DomRenderFragment(isAttached: true)) {
    child.removeChildren(this);
    child.parent = null;
    return;
  }

  if (kVerboseMode) {
    print("Remove child ${child.node} of $node");
  }

  assert(node == child.node.parentNode, 'Child node must be a child of this element.');

  node.removeChild(child.node);
  child.parent = null;
}