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



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


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


compareTo(SemanticsSortKey other) int
Compares this object to another object.
debugFillProperties(DiagnosticPropertiesBuilder properties) → void
Add additional properties associated with the node.
doCompare(covariant OrdinalSortKey other) int
The implementation of compareTo.
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 DiagnosticsNode.toStringDeep.
toString({DiagnosticLevel minLevel = DiagnosticLevel.info}) String
A string representation of this object.
toStringShort() String
A brief description of this object, usually just the runtimeType and the hashCode.


operator ==(Object other) bool
The equality operator.