getLeafNodes method

List<Node<T>> getLeafNodes()

Gets nodes that have no output connections (leaf nodes)

Implementation

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