OrdinalSortKey class

A SemanticsSortKey that sorts simply based on the double value it is given.

The OrdinalSortKey compares itself with other OrdinalSortKeys to sort based on the order it is given.

The ordinal value order is typically a whole number, though it can be fractional, e.g. in order to fit between two other consecutive whole numbers. The value must be finite (it cannot be double.nan, double.infinity, or double.negativeInfinity).

See also:

  • SemanticsSortOrder which manages a list of sort keys.


OrdinalSortKey(double order, { String name })
Creates a semantics sort key that uses a double as its key value. [...]


order → double
Determines the placement of this key in a sequence of keys that defines the order in which this node is traversed by the platform's accessibility services. [...]
hashCode → int
The hash code for this object. [...]
read-only, inherited
name → String
An optional name that will make this sort key only order itself with respect to other sort keys of the same name, as long as they are of the same runtimeType.
final, inherited
runtimeType → Type
A representation of the runtime type of the object.
read-only, inherited


debugFillProperties(DiagnosticPropertiesBuilder properties) → void
doCompare(OrdinalSortKey other) → int
The implementation of compareTo. [...]
compareTo(SemanticsSortKey other) → int
Compares this object to another Comparable [...]
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 toStringDeep. [...]
toString({DiagnosticLevel minLevel: DiagnosticLevel.debug }) → 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. [...]