updateOutputPort method

bool updateOutputPort(
  1. String portId,
  2. Port updatedPort
)

Updates an existing output port by ID.

Implementation

bool updateOutputPort(String portId, Port updatedPort) {
  return runInAction(() {
    final index = outputPorts.indexWhere((port) => port.id == portId);
    if (index >= 0) {
      outputPorts[index] = updatedPort;
      return true;
    }
    return false;
  });
}