BleConnectionState class

A change in the host's connection to a peripheral.

Delivered on Bluetooth.connectionStates, this lets apps react to connects and, importantly, unexpected disconnects (device out of range, powered off, GATT dropped), which a one-shot connect() future cannot report.

Constructors

BleConnectionState({required String deviceId, required bool connected})
const

Properties

connected bool
Whether the host is now connected to it.
final
deviceId String
The peripheral whose connection changed (a BleDevice.id).
final
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
override

Operators

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