sortBy method
Sorts the list in ascending order of the object's field value.
Implementation
void sortBy(Comparable Function(E e) getVal) =>
sort((a, b) => getVal(a).compareTo(getVal(b)));
Sorts the list in ascending order of the object's field value.
void sortBy(Comparable Function(E e) getVal) =>
sort((a, b) => getVal(a).compareTo(getVal(b)));