makeNode method

ProgramInfoNode makeNode({
  1. required String name,
  2. required ProgramInfoNode parent,
  3. required NodeType type,
})

Implementation

ProgramInfoNode makeNode(
    {required String name,
    required ProgramInfoNode parent,
    required NodeType type}) {
  return parent.children.putIfAbsent(
      name,
      () => ProgramInfoNode._(
          id: _nextId++, name: name, parent: parent, type: type));
}