AltHoldDetector class
A single, non-consuming HardwareKeyboard handler implementing peek-then-act: hold Alt alone past a threshold to reveal, release (or press any other key) to dismiss.
It owns phase only and calls onReveal / onDismiss. It knows nothing
about activators, so it can never fire or swallow a real shortcut — its
return value only sets the platform-handled flag and never blocks Flutter's
Shortcuts/Actions dispatch.
Constructors
- AltHoldDetector({AltHoldOptions options = const AltHoldOptions(), AltHoldClock clock = const SystemAltHoldClock(), HardwareKeyboard? keyboard, VoidCallback? onReveal, VoidCallback? onDismiss})
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- onDismiss → VoidCallback?
-
final
- onReveal → VoidCallback?
-
final
- phase → AltHoldPhase
-
Test seam.
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
dispose(
) → void -
forceReset(
) → void -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
start(
) → void -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited