writeDescriptor method

Future<Descriptor> writeDescriptor(
  1. String serviceUuid,
  2. String characteristicUuid,
  3. String descriptorUuid,
  4. Uint8List value, {
  5. String? transactionId,
})

Writes value of Descriptor matching specified UUIDs.

Write value to Descriptor specified by serviceUuid, characteristicUuid and descriptorUuid. Returns Descriptor which saved passed value. Optional transactionId could be used to cancel operation.

Will result in error if discovery was not done during this connection.

Implementation

Future<Descriptor> writeDescriptor(
  String serviceUuid,
  String characteristicUuid,
  String descriptorUuid,
  Uint8List value, {
  String? transactionId,
}) =>
    _manager.writeDescriptorForPeripheral(
      this,
      serviceUuid,
      characteristicUuid,
      descriptorUuid,
      value,
      transactionId ?? TransactionIdGenerator.getNextId(),
    );