monitorCharacteristic method
Returns a Stream of values emitted by a Characteristic identified by
characteristicUuid
.
Just like readCharacteristic() method, values are emitted as
CharacteristicWithValue objects, which are the same as Characteristic
but with an additonal value
property of type Uint8List. Only
Characteristic where Characteristic.isNotifiable is true
can be
monitored.
Implementation
Stream<CharacteristicWithValue> monitorCharacteristic(
String characteristicUuid, {
String? transactionId,
}) =>
_manager.monitorCharacteristicForService(
peripheral,
this,
characteristicUuid,
transactionId ?? TransactionIdGenerator.getNextId(),
);