PeripheralManager class abstract interface

An object that manages and advertises peripheral services exposed by this app.

Implemented types

Constructors

PeripheralManager()
Gets the instance of PeripheralManager to use.
factory

Properties

characteristicNotifyStateChanged Stream<GATTCharacteristicNotifyStateChangedEventArgs>
Tells that the peripheral manager received a characteristic’s notify changed.
no setter
characteristicReadRequested Stream<GATTCharacteristicReadRequestedEventArgs>
Tells that the local peripheral device received an Attribute Protocol (ATT) read request for a characteristic with a dynamic value.
no setter
characteristicWriteRequested Stream<GATTCharacteristicWriteRequestedEventArgs>
Tells that the local peripheral device received an Attribute Protocol (ATT) write request for a characteristic with a dynamic value.
no setter
connectionStateChanged Stream<CentralConnectionStateChangedEventArgs>
Callback indicating when a remote device has been connected or disconnected.
no setter
descriptorReadRequested Stream<GATTDescriptorReadRequestedEventArgs>
Tells that the local peripheral device received an Attribute Protocol (ATT) read request for a descriptor with a dynamic value.
no setter
descriptorWriteRequested Stream<GATTDescriptorWriteRequestedEventArgs>
Tells that the local peripheral device received an Attribute Protocol (ATT) write request for a descriptor with a dynamic value.
no setter
hashCode int
The hash code for this object.
no setterinherited
logLevel ↔ Level
Effective level considering the levels established in this logger's parents (when hierarchicalLoggingEnabled is true).
getter/setter pairinherited
mtuChanged Stream<CentralMTUChangedEventArgs>
Callback indicating the MTU for a given device connection has changed.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
state BluetoothLowEnergyState
Gets the manager's state.
no setterinherited
stateChanged Stream<BluetoothLowEnergyStateChangedEventArgs>
Tells the manager's state updated.
no setterinherited

Methods

addService(GATTService service) Future<void>
Publishes a service and any of its associated characteristics and characteristic descriptors to the local GATT database.
authorize() Future<bool>
Requests permissions to be granted to this application. These permissions must be requested in your manifest, they should not be granted to your app, and they should have protection level dangerous, regardless whether they are declared by the platform or a third-party app.
inherited
getMaximumNotifyLength(Central central) Future<int>
The maximum amount of data, in bytes, that the central can receive in a single notification or indication.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
notifyCharacteristic(Central central, GATTCharacteristic characteristic, {required Uint8List value}) Future<void>
Send an updated characteristic value to one or more subscribed centrals, using a notification or indication.
removeAllServices() Future<void>
Removes all published services from the local GATT database.
removeService(GATTService service) Future<void>
Removes a specified published service from the local GATT database.
respondReadRequestWithError(GATTReadRequest request, {required GATTError error}) Future<void>
Responds to a read request from a connected central.
respondReadRequestWithValue(GATTReadRequest request, {required Uint8List value}) Future<void>
Responds to a read request from a connected central.
respondWriteRequest(GATTWriteRequest request) Future<void>
Responds to a write request from a connected central.
respondWriteRequestWithError(GATTWriteRequest request, {required GATTError error}) Future<void>
Responds to a write request from a connected central.
showAppSettings() Future<void>
Show screen of details about a particular application.
inherited
startAdvertising(Advertisement advertisement) Future<void>
Advertises peripheral manager data.
stopAdvertising() Future<void>
Stops advertising peripheral manager data.
toString() String
A string representation of this object.
inherited

Operators

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