FocusTraversalPolicy class

An object used to specify a focus traversal policy used for configuring a DefaultFocusTraversal widget.

The focus traversal policy is what determines which widget is "next", "previous", or in a direction from the currently focused FocusNode.

One of the pre-defined subclasses may be used, or define a custom policy to create a unique focus order.

See also:

Implementers

Constructors

FocusTraversalPolicy()

Properties

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

changedScope({FocusNode node, FocusScopeNode oldScope }) → void
This is called whenever the given node is reparented into a new scope, so that the policy has a chance to update or invalidate any cached data that it maintains per scope about the node. [...]
@mustCallSuper
findFirstFocus(FocusNode currentNode) FocusNode
Returns the node that should receive focus if there is no current focus in the FocusScopeNode that currentNode belongs to. [...]
findFirstFocusInDirection(FocusNode currentNode, TraversalDirection direction) FocusNode
Returns the node in the given direction that should receive focus if there is no current focus in the scope to which the currentNode belongs. [...]
inDirection(FocusNode currentNode, TraversalDirection direction) bool
Focuses the next widget in the given direction in the focus scope that contains the given currentNode. [...]
invalidateScopeData(FocusScopeNode node) → void
Clears the data associated with the given FocusScopeNode for this object. [...]
@mustCallSuper, @protected
next(FocusNode currentNode) bool
Focuses the next widget in the focus scope that contains the given currentNode. [...]
previous(FocusNode currentNode) bool
Focuses the previous widget in the focus scope that contains the given currentNode. [...]
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited
toString() String
Returns a string representation of this object.
inherited

Operators

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