getInput method

Node<T>? getInput(
  1. T nodeValue
)

Gets a Node in the inputs.

  • Resolves nodeValue to a Node using graph.
  • Returns the Node or null if not present.
  • Throws a StateError if graph is null when trying to resolve nodeValue to a Node.

Implementation

Node<T>? getInput(T nodeValue) {
  if (nodeValue == value) return this;

  var node = _inputs.firstWhereOrNull((e) => e.value == nodeValue);
  return node;
}