sortedUsing method
Implementation
List<T> sortedUsing(Comparable getter(T item)) {
final ts = [...this];
return ts.sortedBy((a, b) {
final f1 = getter(a);
final f2 = getter(b);
return f1.compareTo(f2);
}).cast();
}
List<T> sortedUsing(Comparable getter(T item)) {
final ts = [...this];
return ts.sortedBy((a, b) {
final f1 = getter(a);
final f2 = getter(b);
return f1.compareTo(f2);
}).cast();
}