root property
Returns the root object of the hierarchy.
This walks up the parent chain until the top-most object is reached.
Implementation
ScreenObject? get root {
ScreenObject? parent = this.parent;
while (parent?.parent != null) {
parent = parent?.parent;
}
return parent;
}