readCharacteristic method
Reads the value of a Characteristic identified by characteristicUuid
.
It returns a Future that completes with CharacteristicWithValue,
which is just a Characteristic but with an additonal value
property of type Uint8List. Only Characteristic where
Characteristic.isReadable is true
can be read.
Implementation
Future<CharacteristicWithValue> readCharacteristic(
String characteristicUuid, {
String? transactionId,
}) =>
_manager.readCharacteristicForService(
peripheral,
this,
characteristicUuid,
transactionId ?? TransactionIdGenerator.getNextId(),
);