FocusScopeNode class

An interior node in 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 interior nodes in the focus tree cannot themselves be focused but instead remember previous focus states. A scope is currently active in its parent whenever isFirstFocus is true. If that scope is detached from its parent, its previous sibling becomes the parent's first focus.

A FocusNode has the overall focus when the node is focused in its parent FocusScopeNode and FocusScopeNode.isFirstFocus is true for that scope and all its ancestor scopes.

If a FocusScopeNode is removed, then the next sibling node will be set as the focused node by the FocusManager.

See also:

Mixed in types




isFirstFocus bool
Whether this scope is currently active in its parent scope.
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


autofocus(FocusNode node) → void
If this scope lacks a focus, request that the given node becomes the focus. [...]
debugDescribeChildren() List<DiagnosticsNode>
Returns a list of DiagnosticsNode objects describing this node's children. [...]
debugFillProperties(DiagnosticPropertiesBuilder properties) → void
Add additional properties associated with the node. [...]
detach() → void
Remove this scope from its parent child list. [...]
reparentIfNeeded(FocusNode node) → void
Adopts the given node if it is focused in another scope. [...]
reparentScopeIfNeeded(FocusScopeNode child) → void
Adopts the given scope if it is the first focus of another scope. [...]
requestFocus(FocusNode node) → void
Requests that the given node becomes the focus for this scope. [...]
setFirstFocus(FocusScopeNode child) → void
Makes the given child the first focus of this scope. [...]
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
toDiagnosticsNode({String name, DiagnosticsTreeStyle style }) DiagnosticsNode
Returns a debug representation of the object that is used by debugging tools and by DiagnosticsNode.toStringDeep. [...]
toString({DiagnosticLevel minLevel: DiagnosticLevel.debug }) String
Returns a string representation of this object.
toStringDeep({String prefixLineOne: '', String prefixOtherLines, DiagnosticLevel minLevel: DiagnosticLevel.debug }) String
Returns a string representation of this node and its descendants. [...]
toStringShallow({String joiner: ', ', DiagnosticLevel minLevel: DiagnosticLevel.debug }) String
Returns a one-line detailed description of the object. [...]
toStringShort() String
A brief description of this object, usually just the runtimeType and the hashCode. [...]


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