distinctBy<T> method
Implementation
Iterable<E> distinctBy<T>(T Function(E e) distinctBy) {
final uniqueItems = <T, E>{};
for (var e in this) {
uniqueItems[distinctBy(e)] = e;
}
return uniqueItems.values;
}
Iterable<E> distinctBy<T>(T Function(E e) distinctBy) {
final uniqueItems = <T, E>{};
for (var e in this) {
uniqueItems[distinctBy(e)] = e;
}
return uniqueItems.values;
}