changeParent method

void changeParent(
  1. Component newParent
)

Changes the current parent for another parent and prepares the tree under the new root.

Implementation

void changeParent(Component newParent) {
  newParent.lifecycle._adoption.add(this);
  _mountCompleter = null;
}