disconnect method

  1. @override
Future<void> disconnect()
inherited

Close the connection

Implementation

@override
Future<void> disconnect() async {
  ModbusAppLogger.fine("Closing serial port ${serialPort.name}...");
  if (serialPort.isOpen) {
    await serialPort.close();
  }
}