find<T> static method

NavNode<T>? find<T>(
  1. List<NavSection<T>> sections,
  2. NavNodeId id
)

Find a node by id across all sections, or null.

Implementation

static NavNode<T>? find<T>(List<NavSection<T>> sections, NavNodeId id) {
  NavNode<T>? hit;
  walk<T>(sections, (n, _) {
    if (n.id == id) hit = n;
  });
  return hit;
}