Google is committed to advancing racial equity for Black communities. See how.

child method

Node child (String name)

Returns a child Node with name.

If a child with name already exists and was not deleted, this method returns it. Otherwise, it creates a new Node.

Implementation

Node child(String name) {
  if (_writer == null) {
    return Node.deleted();
  }
  if (_children.containsKey(name)) {
    return _children[name];
  }
  return _children[name] = Node._(this, name, index, _writer);
}