writeCharacteristic method

  1. @override
Future<void> writeCharacteristic(
  1. Uuid service,
  2. Uuid characteristic,
  3. Uint8List value, {
  4. bool withoutResponse = false,
})
override

Writes value to characteristic under service. With withoutResponse the write is unacknowledged (higher throughput, no error feedback).

Implementation

@override
Future<void> writeCharacteristic(
  Uuid service,
  Uuid characteristic,
  Uint8List value, {
  bool withoutResponse = false,
}) async {
  if (_closed) throw const BleGattException('GATT connection is closed');
  writes.add((
    characteristic: characteristic,
    value: Uint8List.fromList(value),
    withoutResponse: withoutResponse,
  ));
}