BleDeviceExtension extension
Extension methods for BleDevice to simplify common operations.
- on
Properties
-
connectionStream
→ Stream<
bool> -
Available on BleDevice, provided by the BleDeviceExtension extension
A stream of bool that emits connection status changes for the device.no setter -
isConnected
→ Future<
bool> -
Available on BleDevice, provided by the BleDeviceExtension extension
Checks if the device is currently connected.no setter -
pairingStateStream
→ Stream<
bool> -
Available on BleDevice, provided by the BleDeviceExtension extension
A stream of bool that emits pairing status changes for the device.no setter
Methods
-
connect(
) → Future< void> -
Available on BleDevice, provided by the BleDeviceExtension extension
Connects to the device. -
disconnect(
) → Future< void> -
Available on BleDevice, provided by the BleDeviceExtension extension
Disconnects from the device. -
discoverServices(
{Duration? timeout}) → Future< List< BleService> > -
Available on BleDevice, provided by the BleDeviceExtension extension
Discovers the services offered by the device. -
getCharacteristic(
String characteristic, {required String service, bool preferCached = true, Duration? timeout}) → Future< BleCharacteristic> -
Available on BleDevice, provided by the BleDeviceExtension extension
Retrieves a specific characteristic from a service. -
getService(
String service, {bool preferCached = true, Duration? timeout}) → Future< BleService> -
Available on BleDevice, provided by the BleDeviceExtension extension
Retrieves a specific service. -
isPaired(
{BleCommand? pairingCommand, Duration? timeout}) → Future< bool?> -
Available on BleDevice, provided by the BleDeviceExtension extension
Check if a device is paired. -
pair(
{BleCommand? pairingCommand, Duration? timeout}) → Future< void> -
Available on BleDevice, provided by the BleDeviceExtension extension
Pair a device. -
requestMtu(
int expectedMtu) → Future< int> -
Available on BleDevice, provided by the BleDeviceExtension extension
Requests a specific MTU (Maximum Transmission Unit) size for the connection. -
unpair(
{Duration? timeout}) → Future< void> -
Available on BleDevice, provided by the BleDeviceExtension extension
Unpair a device.