update method
void
update()
Call periodically (e.g. each frame) to mark hands as lost when the camera has not produced landmarks recently.
Implementation
void update() {
final now = DateTime.now();
for (final entry in hands.entries) {
final state = entry.value;
if (!state.tracked) continue;
final last = _lastFrameTime[entry.key];
if (last == null || now.difference(last) > trackingTimeout) {
state.tracked = false;
_filters[entry.key]?.forEach((f) => f.reset());
onHandLost?.call(entry.key);
}
}
}