writeValue method
Writes a string to this characteristic.
value - The string to be written. It is encoded as UTF-8 before being sent, so only ASCII characters map to
single bytes with the same value. To send arbitrary byte values, use writeBytes instead.
writeType - Optional write type, defaulting to BluetoothGattCharacteristic.WRITE_TYPE_DEFAULT.
Implementation
Future<void> writeValue({
required String value,
int? writeType,
}) async {
return CentralPlatformInterface.instance.writeCharacteristic(
characteristic: this,
value: utf8.encode(value),
writeType: writeType,
);
}