count property
int
get
count
Gets the number of nodes in the sub-tree of this node.
Implementation
int get count {
if (isLeaf) {
return 1;
} else {
return children!.fold<int>(
1,
(acc, child) => acc + child.count,
);
}
}