sorted method

List<T> sorted(
  1. Comparator<T> compare
)

Creates a sorted list of the elements of the iterable.

The elements are ordered by the compare Comparator.

Implementation

List<T> sorted(Comparator<T> compare) => [...this]..sort(compare);