disconnectDevice method

  1. @override
Future<bool?> disconnectDevice()
override

Implementation

@override
Future<bool?> disconnectDevice() async {
  try {
    return await bltMethodChannel.invokeMethod('disconnectDevice');
  } on PlatformException catch (e) {
    if (e.code == 'BluetoothException') {
      throw BluetoothException(e.message);
    }
    throw Exception(e.message);
  }
}