isBleTurnedOnStream property
Stream to monitor Bluetooth state
Implementation
Stream<bool> get isBleTurnedOnStream =>
Stream.periodic(const Duration(seconds: 5), (_) async {
final state = await UniversalBle.getBluetoothAvailabilityState();
return state == AvailabilityState.poweredOn;
}).asyncMap((event) => event).distinct();