setRoot method
Replaces the top-level element with topLevel.
Implementation
void setRoot(TreeElement? topLevel) {
_base = TreeElement();
if (topLevel != null) {
_base
..instanceName = topLevel.instanceName
..addChild(topLevel);
}
}