FocusManager class

Manages the focus tree.

The focus tree keeps track of which widget is the user's current focus. The focused widget often listens for keyboard events.

The focus manager is responsible for holding the FocusScopeNode that is the root of the focus tree and tracking which FocusNode has the overall focus.

The FocusManager is held by the WidgetsBinding as WidgetsBinding.focusManager. The FocusManager is rarely accessed directly. Instead, to find the FocusScopeNode for a given BuildContext, use FocusScope.of.

See also:

Constructors

FocusManager()
Creates an object that manages the focus tree. [...]

Properties

rootScope FocusScopeNode
The root FocusScopeNode in the focus tree. [...]
final
hashCode int
The hash code for this object. [...]
read-only, inherited
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited

Methods

toString() String
Returns a string representation of this object.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited

Operators

operator ==(dynamic other) bool
The equality operator. [...]
inherited