sortReversed method

IList<T> sortReversed([
  1. int compare(
    1. T a,
    2. T b
    )?
])

Sorts this list in reverse order in relation to the default sort method.

Implementation

IList<T> sortReversed([int Function(T a, T b)? compare]) {
  return (compare != null)
      ? sort((T a, T b) => compare(b, a))
      : sort((T a, T b) => compareObject(b, a));
}