disconnect method
- String port
Disconnects the device on the given port, if any, and removes its entry from devices.
Implementation
void disconnect(String port) {
final device = devices[port];
if (device == null) return;
device.dispose();
devices.remove(port);
models.home.setMessage(severity: Severity.info, text: "Disconnected from $port");
notifyListeners();
}