BluetoothDevice class

Properties

canSendWriteWithoutResponse → Future<bool>
Indicates whether the Bluetooth Device can send a write without response
no setter
hashCode → int
The hash code for this object.
no setteroverride
id → DeviceIdentifier
final
isDiscoveringServices → Stream<bool>
no setter
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 = true}) → Future<void>
Connect with timeout
currentMTU() → Future<int>
Just check current MTU directly
currentState() → Future<BluetoothDeviceState>
Just check current connect state directly
disconnect() → Future
Cancels connection to the Bluetooth Device
discoverServices() → 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
requestMtu(int desiredMtu) → Future<void>
Request to change the MTU Size Throws error if request did not complete successfully
toString() → String
A string representation of this object.
override

Operators

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

Static Methods

restoreWithMac({required String deviceName, required String macAddress}) → Future<BluetoothDevice?>
Restore Connection With Mac address on android