BleMeshManager<T extends BleMeshManagerCallbacks> class

A Singleton that should be used to handle BLE Mesh connectivity features.

It implements the methods to init GATT layer, subscribe to notifications and send PDUs for BLE Mesh nodes.

Inheritance

Constructors

BleMeshManager()
A Singleton that should be used to handle BLE Mesh connectivity features.
factory

Properties

bleInstance → FlutterReactiveBle
The entry point for BLE library
no setterinherited
callbacks ↔ T?
The callbacks used to handle events (should not be null at the time of calling connect method)
getter/setter pairinherited
connectCompleter Completer<void>
A Completer used to handle the async behavior of connect method
no setterinherited
device → DiscoveredDevice?
The current BLE device being managed if any
no setterinherited
hashCode int
The hash code for this object.
no setterinherited
isProvisioningCompleted bool
A bool used to adapt the connection process
getter/setter pairinherited
mtuSize int
The current MTU size (defaults to maxPacketSize)
getter/setter pairinherited
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 :
inherited
disconnect() Future<void>
Will disconnect from the current device if any
override
dispose() Future<void>
Will clear used resources
inherited
getMacId() Future<String?>
This method will read the doozCustomCharacteristicUuid if a device is connected and return the MAC address stored
inherited
getServiceMacId() Future<String?>
A method to read the connected device's MAC address via doozCustomServiceUuid
initGatt() Future<void>
A method that should implement the GATT initialization.
override
isRequiredServiceSupported(bool shouldCheckDoozCustomService) Future<DiscoveredService?>
A method that should be overriden to define a validation on the BLE device advertised services
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
refreshDeviceCache() Future<void>
A method to clear GATT cache (only useful in some cases in Android)
sendPdu(List<int> pdu) Future<void>
This method will send the given PDU.
toString() String
A string representation of this object.
inherited

Operators

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