findParentCached method

String? findParentCached(
  1. String childId
)

O(1) lookup of the parent id of childId. Returns null if childId is the root or not found.

Implementation

String? findParentCached(String childId) {
  if (_parentCacheDirty) _rebuildNodeIndex();
  return _parentCache[childId];
}