subtreeHasBadge<T> static method
True when node or anything beneath it carries a badge — used to mark a
collapsed module/rail icon with a dot.
Implementation
static bool subtreeHasBadge<T>(NavNode<T> node) {
if (node.badge != null) return true;
for (final c in node.children) {
if (subtreeHasBadge(c)) return true;
}
return false;
}