checkBluetooth method
Checks if Bluetooth is enabled on the device. This method uses platform-specific method channels to check the Bluetooth status.
Implementation
@override
Future<void> checkBluetooth() async {
if (Platform.isIOS) {
try {
await iOSSDKChannel.invokeMethod<String>('checkiOSBluetooth');
} on PlatformException catch (e) {
log("Error checkiOSBluetooth: ${e.message}");
rethrow;
}
}
if (Platform.isAndroid) {
try {
await methodChannel.invokeMethod<String>('checkBluetooth');
} on PlatformException catch (e) {
log("Error checkBluetooth: ${e.message}");
rethrow;
}
}
}