getHologramName method
Gets the name of the hologram.
return Name of the hologram. throws DocumentException An error has occurred during Document Library execution.
Implementation
String getHologramName() {
Pointer<Char> pHologramName = nullptr;
Pointer<Int> pHologramNameSize = calloc.allocate(1);
pHologramNameSize[0] = -1;
try {
var err = documentSDK.id3DocumentHologramAuthenticationResult_GetHologramName(_pHandle.value, pHologramName, pHologramNameSize);
if (err == DocumentError.insufficientBuffer.value) {
pHologramName = calloc.allocate(pHologramNameSize.value);
err = documentSDK.id3DocumentHologramAuthenticationResult_GetHologramName(_pHandle.value, pHologramName, pHologramNameSize);
if (err != DocumentError.success.value) {
throw DocumentException(err);
}
}
final vHologramName = utf8.decode(Uint8List.fromList(pHologramName.cast<Uint8>().asTypedList(pHologramNameSize.value)));
return vHologramName;
} finally {
calloc.free(pHologramName);
calloc.free(pHologramNameSize);
}
}