doCompare method Null safety

  1. @override
int doCompare(
  1. covariant NumericFocusOrder other
)
override

The subclass implementation called by compareTo to compare orders.

The argument is guaranteed to be of the same runtimeType as this object.

The method should return a negative number if this object comes earlier in the sort order than the other argument; and a positive number if it comes later in the sort order than other. Returning zero causes the system to fall back to the secondary sort order defined by OrderedTraversalPolicy.secondary

Implementation

@override
int doCompare(NumericFocusOrder other) => order.compareTo(other.order);