readValue method

Future<List<int>> readValue({
  1. int? offset,
})

Reads the value of the characteristic.

Implementation

Future<List<int>> readValue({int? offset}) async {
  var options = <String, DBusValue>{};
  if (offset != null) {
    options['offset'] = DBusUint16(offset);
  }
  var result = await _object.callMethod(_gattCharacteristicInterfaceName,
      'ReadValue', [DBusDict.stringVariant(options)],
      replySignature: DBusSignature('ay'));
  return result.returnValues[0].asByteArray().toList();
}