sortBy<R extends Comparable<Object> > method
Sorts elements in the list in-place according to natural sort order of the value returned by specified selector
function.
The sort is stable. It means that equal elements preserve their order relative to each other after sorting.
Implementation
List<T> sortBy<R extends Comparable<Object>>(R Function(T) selector) {
return sortTo([], _compareBy(selector));
}