getConnectionsToPort method

List<Connection> getConnectionsToPort(
  1. String nodeId,
  2. String portId
)

Gets all connections targeting a specific port.

Returns connections where the specified port is the target.

Example:

final incoming = controller.getConnectionsToPort('node2', 'input1');

Implementation

List<Connection> getConnectionsToPort(String nodeId, String portId) {
  return _connections
      .where(
        (conn) => conn.targetNodeId == nodeId && conn.targetPortId == portId,
      )
      .toList();
}