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