writeCharacteristic method
Writes the value to the Characteristic identified by
characteristicUuid.
It returns a Future that completes with the Characteristic for the convenience of chaining operations.
Operation will succeed only if Characteristic where
Characteristic.isWritableWithResponse or
Characteristic.isWritableWithoutResponse is true and
withResponse is specified accordingly can be written to.
Implementation
Future<Characteristic> writeCharacteristic(
String characteristicUuid,
Uint8List value,
bool withResponse, {
String? transactionId,
}) =>
_manager.writeCharacteristicForService(
peripheral,
this,
characteristicUuid,
value,
withResponse,
transactionId ?? TransactionIdGenerator.getNextId());