FocusManager class

Owns the focus tree, tracks primaryFocus, and routes focus-priority key events.

Constructors

FocusManager(InputManager inputManager)
Creates the root scope and owns a focus-priority key subscription.

Properties

hashCode int
The hash code for this object.
no setterinherited
inputManager InputManager
Input manager whose dispatcher delivers focus-priority key events.
final
primaryFocus FocusNode?
Node that currently holds primary focus, or null when none.
no setter
rootScope FocusScopeNode
Synthetic attached, non-requestable root for the focus tree.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

dispose() → void
Release input subscriptions owned by this focus manager.
focusNext() bool
Move focus to the next focusable node in widget-tree order.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited
traversalOrder() List<FocusNode>
Returns the cached tree-order traversal list, rebuilding it if dirty.

Operators

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

Static Methods

of(BuildContext context) FocusManager
Returns the focus manager owned by context's build owner.