isPaired static method
isPaired will return a boolean
forceRefresh
will get the latest pair status of this device
Implementation
static Future<bool> isPaired(
String address, {
bool forceRefresh = false,
}) async {
try {
var result = await _channel.invokeMethod("isPaired", args: {
"device": forceRefresh
? address.replaceAll(":", "")
: WinHelper.getDeviceFromAddress(address),
"forceRefresh": forceRefresh,
});
return result != null && result;
} catch (e) {
rethrow;
}
}