unpairDevice method

Future<bool> unpairDevice(
  1. String address
)

Unpairs from a device

Implementation

Future<bool> unpairDevice(String address) async {
  try {
    // If this is the connected device, disconnect first
    if (_connectedDevice?.address == address) {
      await disconnect();
    }

    return await _channel.invokeMethod('unpairDevice', {'address': address});
  } catch (e) {
    return false;
  }
}