readCharacteristic method

Future<List<int>> readCharacteristic(
  1. QualifiedCharacteristic characteristic
)

Reads the value of the specified characteristic.

The returned future completes with an error in case of a failure during reading.

Be aware that a read request could be satisfied by a notification delivered for the same characteristic via characteristicValueStream before the actual read response arrives (due to the design of iOS BLE API).

Implementation

Future<List<int>> readCharacteristic(
    QualifiedCharacteristic characteristic) async {
  await initialize();
  return _connectedDeviceOperator.readCharacteristic(characteristic);
}