getRoot method

Traverse the tree upwards and retrieve the root. The root is defined as the node which has no parent.

Implementation

@override
DartBlockValueTreeBooleanNode getRoot() {
  if (parent == null) {
    return this;
  } else {
    return parent!.getRoot();
  }
}