adapterState property
The state of the Bluetooth adapter, as a stream that also exposes the
current value via await Bluebird.adapterState.value.
- the platform reports adapter state only on demand (events fire on changes), so the current value is fetched the first time it is needed.
Implementation
static final AsyncValueStream<BluetoothAdapterState> adapterState = AsyncValueStream(
value: _fetchAdapterState,
changes: () => extractEventStream<OnAdapterStateChangedEvent>().map((e) => e.adapterState),
);