handle static method
bool
handle({
- required bool highlightVisible,
- required bool glowVisible,
- required bool onUserInteraction(
- bool agentUiVisible
- required VoidCallback clearHighlight,
- required VoidCallback dismissGlow,
RN handleHostTouch: interrupt the runtime, then clear the box and the
glow — this also covers a box drawn with no mission running, and a glow
still in its post-hold. Returns true when anything was stopped.
Implementation
static bool handle({
required bool highlightVisible,
required bool glowVisible,
required bool Function(bool agentUiVisible) onUserInteraction,
required VoidCallback clearHighlight,
required VoidCallback dismissGlow,
}) {
final agentUiVisible = highlightVisible || glowVisible;
final interrupted = onUserInteraction(agentUiVisible);
if (!interrupted && !agentUiVisible) return false;
clearHighlight();
dismissGlow();
return true;
}