BleManager<E extends BleManagerCallbacks> class abstract

An abstract class that should be extended to handle BLE device interactions.

It already implements most parts of the connection process and also triggers event on the given BleManagerCallbacks.

Implementers

Constructors

BleManager(FlutterReactiveBle _bleInstance)
An abstract class that should be extended to handle BLE device interactions.

Properties

bleInstance → FlutterReactiveBle
The entry point for BLE library
no setter
callbacks ↔ E?
The callbacks used to handle events (should not be null at the time of calling connect method)
getter/setter pair
connectCompleter Completer<void>
A Completer used to handle the async behavior of connect method
no setter
device → DiscoveredDevice?
The current BLE device being managed if any
no setter
hashCode int
The hash code for this object.
no setterinherited
isProvisioningCompleted bool
A bool used to adapt the connection process
getter/setter pair
mtuSize int
The current MTU size (defaults to maxPacketSize)
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

connect(DiscoveredDevice discoveredDevice, {Duration connectionTimeout = kDefaultConnectionTimeout, List<String>? whitelist, bool shouldCheckDoozCustomService = false}) Future<void>
Will connect to the provided DiscoveredDevice using its id as identifier. This method will subscribe to connection status updates to :
disconnect() Future<void>
Will disconnect from the current device if any
dispose() Future<void>
Will clear used resources
getMacId() Future<String?>
This method will read the doozCustomCharacteristicUuid if a device is connected and return the MAC address stored
initGatt() Future<void>
A method that should implement the GATT initialization.
isRequiredServiceSupported(bool shouldCheckDoozCustomService) Future<DiscoveredService?>
A method that should be overriden to define a validation on the BLE device advertised services
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

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