ReadingOrderTraversalPolicy class

Traverses the focus order in "reading order".

By default, reading order traversal goes in the reading direction, and then down, using this algorithm:

  1. Find the node rectangle that has the highest top on the screen.
  2. Find any other nodes that intersect the infinite horizontal band defined by the highest rectangle's top and bottom edges.
  3. Pick the closest to the beginning of the reading order from among the nodes discovered above.

It uses the ambient Directionality in the context for the enclosing FocusTraversalGroup to determine which direction is "reading order".

See also:

Mixed in types




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


sortDescendants(Iterable<FocusNode> descendants) Iterable<FocusNode>
Sorts the given descendants into focus order. [...]
changedScope({FocusNode node, FocusScopeNode oldScope}) → void
This is called whenever the given node is re-parented 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. [...]
debugFillProperties(DiagnosticPropertiesBuilder properties) → void
Add additional properties associated with the node.
@mustCallSuper, @protected, inherited
findFirstFocus(FocusNode currentNode) FocusNode
Returns the node that should receive focus if there is no current focus in the nearest FocusScopeNode that currentNode belongs to. [...]
findFirstFocusInDirection(FocusNode currentNode, TraversalDirection direction) FocusNode
Returns the first 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 FocusScope that contains the currentNode. [...]
@mustCallSuper, inherited
invalidateScopeData(FocusScopeNode node) → void
Clears the data associated with the given FocusScopeNode for this object. [...]
next(FocusNode currentNode) bool
Focuses the next widget in the focus scope that contains the given currentNode. [...]
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
previous(FocusNode currentNode) bool
Focuses the previous widget in the focus scope that contains the given currentNode. [...]
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:}) String
Returns a string representation of this object.
toStringShort() String
A brief description of this object, usually just the runtimeType and the hashCode.


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