dispose method

  1. @override
Future<void> dispose({
  1. bool isSafe = true,
})
override

Closes the connection to the device.

Implementation

@override
Future<void> dispose({bool isSafe = true}) async {
  if (!isOpen) return;
  if (isSafe) {
    _delegate?.close();
    _delegate?.dispose();
  }
  _delegate = null;
}