containsKey method
- String? key
Determines whether the StringDictobject contains the specified key.
param key The key to locate in the object. return true if the object contains an element with the specified key, otherwise false. throws DocumentException An error has occurred during Document Library execution.
Implementation
bool containsKey(String? key) {
Pointer<Char>? pKey = key?.toNativeUtf8().cast<Char>();
Pointer<Bool> pResult = calloc();
try {
var err = documentSDK.id3DocumentStringDict_ContainsKey(_pHandle.value, pKey ?? nullptr, pResult);
if (err != DocumentError.success.value) {
throw DocumentException(err);
}
final vResult = pResult.value;
return vResult;
} finally {
if (pKey != null) {
calloc.free(pKey);
}
calloc.free(pResult);
}
}