mountRoot method

Branch mountRoot(
  1. Seed seed
)

Mounts seed as the root branch of this owner's tree.

Implementation

Branch mountRoot(Seed seed) {
  assert(
    _root == null,
    'mountRoot called with an existing root; call unmountRoot() first',
  );
  final branch = seed.createBranch();
  branch.owner = this;
  branch.mount(null, null);
  _root = branch;
  return branch;
}