sorted method

List<T> sorted()

Implementation

List<T> sorted() {
  final buffer = [...this];
  buffer.sort((T a, T b) => a.compareTo(b));
  return buffer;
}