LexicalFocusOrder class

Can be given to a FocusTraversalOrder widget to use a String to assign a lexical order to a widget subtree that is using a OrderedTraversalPolicy to define the order in which widgets should be traversed with the keyboard.

This sorts strings using Dart's default string comparison, which is not locale specific.

Only orders of the same type are comparable. If a set of widgets in the same FocusTraversalGroup contains orders that are not comparable with each other, it will assert, since the ordering between such keys is undefined. To avoid collisions, use a FocusTraversalGroup to group similarly ordered widgets together.

When overriding, doCompare must be overridden instead of compareTo, which calls doCompare to do the actual comparison.

See also:

  • FocusTraversalOrder, a widget that assigns an order to a widget subtree for the OrderedFocusTraversalPolicy to use.
Inheritance

Constructors

LexicalFocusOrder(String order)
Const constructor. This constructor enables subclasses to provide const constructors so that they can be used in const expressions.
const

Properties

order String
The String that defines the lexical order to assign to the widget subtree using FocusTraversalOrder. [...]
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

debugFillProperties(DiagnosticPropertiesBuilder properties) → void
Add additional properties associated with the node. [...]
override
doCompare(covariant LexicalFocusOrder other) int
The subclass implementation called by compareTo to compare orders. [...]
override
compareTo(FocusOrder other) int
Compares this object to another Comparable. [...]
@nonVirtual, inherited
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 DiagnosticsNode.toStringDeep.
inherited
toString({DiagnosticLevel minLevel: DiagnosticLevel.info}) String
Returns a string representation of this 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