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.

See also:

Mixed in types

Constructors

FocusScopeNode()

Properties

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

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. [...]
override
debugFillProperties(DiagnosticPropertiesBuilder properties) → void
Add additional properties associated with the node. [...]
override
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. [...]
inherited
toDiagnosticsNode({String name, DiagnosticsTreeStyle style }) DiagnosticsNode
Returns a debug representation of the object that is used by debugging tools and by toStringDeep. [...]
inherited
toString({DiagnosticLevel minLevel: DiagnosticLevel.debug }) String
Returns a string representation of this object.
inherited
toStringDeep({String prefixLineOne: '', String prefixOtherLines, DiagnosticLevel minLevel: DiagnosticLevel.debug }) String
Returns a string representation of this node and its descendants. [...]
inherited
toStringShallow({String joiner: ', ', DiagnosticLevel minLevel: DiagnosticLevel.debug }) String
Returns a one-line detailed description of the object. [...]
inherited
toStringShort() String
A brief description of this object, usually just the runtimeType and the hashCode. [...]
inherited

Operators

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