sortDesc<T extends Comparable> static method

List<T> sortDesc<T extends Comparable>(
  1. Iterable<T> list
)

Returns a sorted copy of list in descending order.

Implementation

static List<T> sortDesc<T extends Comparable>(Iterable<T> list) =>
    list.toList()..sort((a, b) => b.compareTo(a));