getIndexedString method

Future<String?> getIndexedString(
  1. int index, {
  2. int max = 256,
})

Implementation

Future<String?> getIndexedString(int index, {int max = 256}) async {
  String? res = null;

  using((Arena arena) {
    var buffer = allocateWString(max, allocator: arena);
    int ret = _getIndexedString(this._device, index, buffer, max);
    if(ret == 0) { res = fromWString(buffer); }
  });

  return res;
}