close method

  1. @override
Future<void> close()

Closes the serial port.

Implementation

@override
Future<void> close() async {
  if (_usbPort != null) {
    _usbPort!.close();
    _usbPort = null;
  }
}