BlePeripheral class

A Blueteooth Low Energy Peripheral manager that allows you to advertise and publish L2CAP channels.

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

addReadOnlyService(String uuid, Map<String, String> characteristicValues) Future<void>
Adds a service with string, read-only characteristics.
getState() Stream<AdapterState>
Streams the power state of the manager over time.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
publishL2capChannel() Future<(int, Stream<L2CapChannel>)>
Publishes an L2CAP channel and returns the corresponding PSM and stream to await new channels.
reset() Future<void>
Resets the state of the manager.
startAdvertising([String name = '']) Future<void>
Starts advertising with the given local name along with any added services from addReadOnlyService.
toString() String
A string representation of this object.
inherited
unpublishL2capChannel(int psm) Future<void>
Unpublishes the given PSM.

Operators

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

Static Methods

create() Future<BlePeripheral>
Creates and returns a singleton instance of a BlePeripheral.