removeOutputPort method

bool removeOutputPort(
  1. String portId
)

Removes an output port by ID.

Parameters:

  • portId - The unique identifier of the port to remove

Returns true if the port was found and removed, false otherwise.

Implementation

bool removeOutputPort(String portId) {
  return runInAction(() {
    final index = outputPorts.indexWhere((port) => port.id == portId);
    if (index >= 0) {
      outputPorts.removeAt(index);
      return true;
    }
    return false;
  });
}