initialize method
Implementation
Future<void> initialize() async {
final provider = landmarkProvider;
if (provider == null || _frameSub != null) return;
_emitStatus(const HandTrackingInitializing());
_frameSub = provider.frames.listen(
_onFrame,
onError: (Object e, StackTrace st) {
if (!_hasErrored) {
_hasErrored = true;
_emitStatus(HandTrackingError(e));
}
onError?.call(e, st);
},
);
}