add method
- String? key,
- DocumentInfo documentInfoItem
Adds an item to the DocumentInfoDictionary object.
param key Unique key of the DocumentInfo item to add. param documentInfoItem DocumentInfo item to add. throws DocumentException An error has occurred during Document Library execution.
Implementation
void add(String? key, DocumentInfo documentInfoItem) {
Pointer<Char>? pKey = key?.toNativeUtf8().cast<Char>();
try {
var err = documentSDK.id3DocumentInfoDictionary_Add(_pHandle.value, pKey ?? nullptr, documentInfoItem.handle);
if (err != DocumentError.success.value) {
throw DocumentException(err);
}
} finally {
if (pKey != null) {
calloc.free(pKey);
}
}
}