Context class
Maintains the state of user interaction within a UI context.
The Context class tracks the cursor position and manages interactive components that can receive focus or hover states. It acts as a central store for determining which component should respond to keyboard or mouse input at any given time.
Constructors
Properties
-
componentInstances
→ List<
InteractableComponentInstance> -
All interactive components registered for focus and hover tracking.
final
- currentComponent ↔ InteractableComponentInstance?
-
The component that currently has keyboard focus, if any.
getter/setter pair
- currentComponentIndex ↔ int
-
Index of the currentComponent in componentInstances.
getter/setter pair
- cursorX ↔ int
-
Current X position of the cursor in the UI.
getter/setter pair
- cursorY ↔ int
-
Current Y position of the cursor in the UI.
getter/setter pair
- hashCode → int
-
The hash code for this object.
no setterinherited
- hoveredComponent ↔ InteractableComponentInstance?
-
The component currently under the mouse cursor (hovered), if any.
getter/setter pair
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
setInitialCursorPosition(
int x, int y) → void - Sets the initial cursor position within the UI.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited