OrdinalSortKey class Null safety

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.

OrdinalSortKeys are sorted by the optional name, then by their order. If SemanticsProperties.sortKey is a OrdinalSortKey, then all the other specified sort keys in the same semantics group must also be OrdinalSortKeys.

Keys with no name are compared to other keys with no name, and will be traversed before those with a name.

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).

Inheritance

Constructors

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

Properties

hashCode int
The hash code for this object.
read-onlyinherited
name String?
An optional name that will group this sort key with other sort keys of the same name.
finalinherited
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.
final
runtimeType Type
A representation of the runtime type of the object.
read-onlyinherited

Methods

compareTo(SemanticsSortKey other) int
Compares this object to another object.
inherited
debugFillProperties(DiagnosticPropertiesBuilder properties) → void
Add additional properties associated with the node.
override
doCompare(covariant OrdinalSortKey other) int
The implementation of compareTo.
override
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
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 ==(Object other) bool
The equality operator.
inherited