set method

void set(
  1. int index,
  2. String? item
)

Sets an item of the StringList object.

param index Index of the item to set. param item item to set. throws DocumentException An error has occurred during Document Library execution.

Implementation

void set(int index, String? item) {
  Pointer<Char>? pItem = item?.toNativeUtf8().cast<Char>();
  try {
    var err = documentSDK.id3DocumentStringList_Set(_pHandle.value, index, pItem ?? nullptr);
    if (err != DocumentError.success.value) {
      throw DocumentException(err);
    }
  } finally {
    if (pItem != null) {
      calloc.free(pItem);
    }
  }
}