uniqueBy method
Implementation
Iterable<T> uniqueBy(dynamic uniqueProp(T item)) {
final mapping = <dynamic, T>{};
for (final t in this) {
final unique = uniqueProp(t);
mapping[unique] = t;
}
return mapping.values;
}
Iterable<T> uniqueBy(dynamic uniqueProp(T item)) {
final mapping = <dynamic, T>{};
for (final t in this) {
final unique = uniqueProp(t);
mapping[unique] = t;
}
return mapping.values;
}