getRootNodes method

List<Node<T>> getRootNodes()

Gets nodes that have no input connections (root nodes)

Implementation

List<Node<T>> getRootNodes() {
  return nodes.where((node) => getInputConnections(node.id).isEmpty).toList();
}