updateOutputPort method
Updates an existing output port by ID.
Parameters:
portId- The unique identifier of the port to updateupdatedPort- The new port object to replace the existing one
Returns true if the port was found and updated, false otherwise.
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;
});
}