ComponentInputHandler class Focus Input
Routes input events to the currently focused interactive component.
This InputHandler queries the provided FocusManager for the component currently in focus, then forwards input events to that component’s own input handler.
If no component is focused, or the focused component does not handle the event, this handler returns an ignored ResponseInput.
Example
final focusManager = FocusManager(context: appContext);
final inputHandler = ComponentInputHandler(focusManager);
// When an input event arrives:
ResponseInput response = inputHandler.handleInput(inputEvent);
if (response.handled) {
// Update UI accordingly
}
- Implemented types
Constructors
- ComponentInputHandler.new(FocusManager _focusManager)
-
Creates a new ComponentInputHandler that delegates input events
to the component currently focused by
focusManager
.
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
handleInput(
InputEvent event) → ResponseInput -
Forwards the input
event
to the focused component's input handler, if any.override -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited