BluetoothDevice class

Properties

bleServiceIds Iterable<String>
no setter
canSendWriteWithoutResponse Future<bool>
Indicates whether the Bluetooth Device can send a write without response
no setter
deviceId String
no setter
deviceState BluetoothDeviceState
no setter
hashCode int
The hash code for this object.
no setteroverride
id DeviceIdentifier
final
isDiscoveringServices Stream<bool>
no setter
isServiceDiscovered IsServiceDiscovered?
getter/setter pair
mtu Stream<int>
The MTU size in bytes
no setter
name String
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
services Stream<List<BluetoothService>>
Returns a list of Bluetooth GATT services offered by the remote device This function requires that discoverServices has been completed for this device
no setter
state Stream<BluetoothDeviceState>
The current connection state of the device
no setter
type BluetoothDeviceType
final

Methods

connect({Duration? timeout, bool autoConnect = false, int mtu = 0, int connectionPriority = -1}) Future<void>
Establishes a connection to the Bluetooth Device.
disconnect() → void
Cancels connection to the Bluetooth Device
discoverServices({Duration timeout = const Duration(seconds: 3)}) Future<List<BluetoothService>>
Discovers services offered by the remote device as well as their characteristics and descriptors
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
readValue(String service, String characteristic) Future
requestMtu(int desiredMtu) Future<void>
Request to change the MTU Size Throws error if request did not complete successfully
setIsConnected(bool isConnected) → void
setNotifiable(String service, String characteristic, bool enabled) Future<void>
setValueHandler(OnValueChanged? onValueChanged) → void
toString() String
A string representation of this object.
override
writeValue(String service, String characteristic, Uint8List value, {bool withoutResponse = true}) Future<void>

Operators

operator ==(Object other) bool
The equality operator.
override