leafIds<T> static method
All leaf ids beneath (and including, if leaf) node.
Implementation
static List<NavNodeId> leafIds<T>(NavNode<T> node) {
final out = <NavNodeId>[];
void rec(NavNode<T> n) {
if (n.isLeaf) {
out.add(n.id);
} else {
for (final c in n.children) rec(c);
}
}
rec(node);
return out;
}