isBluetoothEnabled method

  1. @override
Future<bool> isBluetoothEnabled()
override

Implementation

@override
Future<bool> isBluetoothEnabled() async {
  if (Platform.isWindows) {
    throw UnimplementedError('Bluetooth is not supported on Windows');
  }
  try {
    final bool result = await _channel.invokeMethod<bool>('isBluetoothEnabled') ?? false;
    return result;
  } catch (e) {
    return false;
  }
}