UniversalBlePeripheral class

Constructors

UniversalBlePeripheral()

Properties

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.
inherited

Operators

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

Static Properties

advertisingStateStream Stream<BlePeripheralAdvertisingStateChanged>
Advertising state update stream.
no setter
characteristicSubscriptionStream Stream<BlePeripheralCharacteristicSubscriptionChanged>
Characteristic subscription update stream.
no setter
connectionStateStream Stream<BlePeripheralConnectionStateChanged>
Connection state update stream.
no setter
mtuChangedStream Stream<BlePeripheralMtuChanged>
MTU update stream.
no setter
serviceAddedStream Stream<BlePeripheralServiceAdded>
Service addition update stream.
no setter

Static Methods

addService(BlePeripheralService service, {Duration? timeout}) Future<void>
clearServices() Future<void>
getAdvertisingState() Future<PeripheralAdvertisingState>
getAvailabilityState() Future<PeripheralReadinessState>
getCapabilities() Future<BlePeripheralCapabilities>
getMaximumNotifyLength(String deviceId) Future<int?>
getServices() Future<List<String>>
getSubscribedClients(String characteristicId) Future<List<String>>
Returns client device ids currently subscribed to characteristicId (e.g. HID report characteristic). Used to restore in-app state after restart.
removeService(String serviceId) Future<void>
setDescriptorReadRequestHandlers(OnPeripheralDescriptorReadRequest? handlers) → void
setDescriptorWriteRequestHandlers(OnPeripheralDescriptorWriteRequest? handlers) → void
setInstance(UniversalBlePeripheralPlatform instance) → void
setReadRequestHandlers(OnPeripheralReadRequest? handlers) → void
setWriteRequestHandlers(OnPeripheralWriteRequest? handlers) → void
startAdvertising({required List<String> services, String? localName, Duration? timeout, ManufacturerData? manufacturerData, PeripheralPlatformConfig? platformConfig}) Future<void>
stopAdvertising() Future<void>
updateCharacteristicValue({required String characteristicId, required Uint8List value, String? deviceId}) Future<void>