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