worker property
The native MediaPipe object which will complete this task.
worker is a computed property and will return the same object on
repeated accesses. On the first access, the native worker object is
initialized, and this accessor with throw an Exception if that process
fails.
Implementation
Pointer<Void> get worker {
if (_worker.isNullOrNullPointer) {
final errorMessageMemory = calloc<Pointer<Char>>();
_log.fine('Creating $taskName worker');
_worker = createWorker(
options.copyToNative(),
errorMessageMemory,
);
handleErrorMessage(errorMessageMemory);
errorMessageMemory.free(1);
options.dispose();
}
return _worker!;
}