findChild method

Node<T>? findChild(
  1. Key key
)

Search the node that has a key value equal to the specified key.

Implementation

Node<T>? findChild(Key key) {
  final iter = descendants.iterator;
  Node<T>? found;
  while (iter.moveNext()) {
    if (iter.current.key == key) {
      found = iter.current;
      break;
    }
  }
  return found;
}