isBleTurnedOn method
Check if Bluetooth is turned on
Implementation
Future<bool> isBleTurnedOn() async {
try {
final state = await UniversalBle.getBluetoothAvailabilityState();
return state == AvailabilityState.poweredOn;
} catch (e) {
log('Failed to check Bluetooth state: $e');
return false;
}
}