parentNidOf method

int parentNidOf(
  1. TKey key
)

Parent nid for key, or kNoParentNid for roots / unregistered keys. Hot path — no allocation, no exception.

Implementation

int parentNidOf(TKey key) {
  final nid = nids[key];
  return nid == null ? kNoParentNid : _parentByNid[nid];
}