Service class

A collection of Characteristics and associated behaviors.

Constructors

Service.fromJson(Map<String, dynamic> jsonObject, Peripheral peripheral, ManagerForService _manager)

Properties

hashCode int
The hash code for this object.
no setteroverride
peripheral Peripheral
Peripheral containing this service.
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
uuid String
The UUID of this service.
getter/setter pair

Methods

characteristics() Future<List<Characteristic>>
Returns a list of Characteristics of this service.
descriptorsForCharacteristic(String characteristicUuid) Future<List<Descriptor>>
Returns a list of Descriptors of a Characteristic identified by characteristicUuid.
monitorCharacteristic(String characteristicUuid, {String? transactionId}) Stream<CharacteristicWithValue>
Returns a Stream of values emitted by a Characteristic identified by characteristicUuid.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
readCharacteristic(String characteristicUuid, {String? transactionId}) Future<CharacteristicWithValue>
Reads the value of a Characteristic identified by characteristicUuid.
readDescriptor(String characteristicUuid, String descriptorUuid, {String? transactionId}) Future<DescriptorWithValue>
Reads the value of a Descriptor identified by descriptorUuid of a Characteristic identified by characteristicUuid.
toString() String
Returns a string representation of this service in a format that exposes Peripheral.identifier and uuid.
override
writeCharacteristic(String characteristicUuid, Uint8List value, bool withResponse, {String? transactionId}) Future<Characteristic>
Writes the value to the Characteristic identified by characteristicUuid.
writeDescriptor(String characteristicUuid, String descriptorUuid, Uint8List value, {String? transactionId}) Future<Descriptor>
Writes the value of a Descriptor identified by descriptorUuid of a Characteristic identified by characteristicUuid.

Operators

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