VrInputArbiter class

Resolves input conflicts without allocating in the per-frame event path.

Priorities are fixed and predictable:

  1. VrInputSource.remotePhone and VrInputSource.touch
  2. Temple taps, gamepads, hands, voice, sonar, and external peripherals
  3. VrInputSource.gaze

An active source suppresses actionable lower-priority events until suppressionWindow has elapsed. Gaze hover remains visible so a reticle can continue tracking; gaze select (the dwell auto-click) is suppressed.

Constructors

VrInputArbiter({Duration suppressionWindow = const Duration(milliseconds: 400), int poolCapacity = 64, VrInputClock? clock})

Properties

hashCode → int
The hash code for this object.
no setterinherited
isGazeSuppressed → bool
Whether a gaze dwell selection would be suppressed right now.
no setter
pool → VrInputEventPool
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
suppressionWindow → Duration
final

Methods

acquire({required VrInputType type, required VrInputSource source, String? targetId, Map<String, dynamic>? data, bool active = true}) → VrInputEvent
addListener(VrInputListener listener, {bool first = false}) → void
first reserves a pre-dispatch phase for system navigation/ray updates. Normal action listeners must check VrInputEvent.handled.
attachDriver(VrInputDriver driver) → void
Attaches a community driver and binds its sink to VrInputDriver.source.
detachDriver(VrInputDriver driver) → bool
dispose() → void
emit({required VrInputType type, required VrInputSource source, String? targetId, Map<String, dynamic>? data, bool active = true}) → bool
Allocation-free convenience after the pool has been initialized.
markActive(VrInputSource source) → void
Refreshes suppression for a held control without re-emitting its action. Call only while actively manipulated, never for an idle heartbeat.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
release(VrInputEvent event) → void
removeListener(VrInputListener listener) → bool
setDwellSuppressed(VrInputSource source, bool suppressed) → void
Keeps automatic gaze selection disabled while a controller is connected, including when it is idle. Hover and explicit button events still work. Each source owns its bit; disconnecting one cannot unlock another source. Releasing a hold retains the normal hysteresis window before dwell resumes.
submit(VrInputEvent event) → bool
Submits an event and returns whether it reached listeners.
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited

Static Methods

priorityOf(VrInputSource source) → VrInputPriority
Maps a source to the stable VRlizate priority hierarchy.