dispose method

  1. @override
Future<void> dispose()
override

Closes the connection to the device.

Implementation

@override
Future<void> dispose() async {
  if (!quiet) logger.info("Closing the socket on port $port");
  await _subscription?.cancel(); _subscription = null;
  _socket?.close(); _socket = null;
}