depth property
int
get
depth
Gets the depth of the node within the tree.
Implementation
int get depth {
if (isRoot) {
return 0;
} else {
return parent!.depth + 1;
}
}
Gets the depth of the node within the tree.
int get depth {
if (isRoot) {
return 0;
} else {
return parent!.depth + 1;
}
}