compareByDescending<T> function
Creates a descending comparator using the function to transform value to a Comparable instance for comparison.
Implementation
Comparator<T> compareByDescending<T>(Comparable Function(T) selector) {
int compareTo(T a, T b) => selector(b).compareTo(selector(a));
return compareTo;
}