uniqueKeys<K, V> function
Implementation
List<MapEntry<K, V>> uniqueKeys<K, V>(Iterable<MapEntry<K, V>> entries) {
final uniqueKeys = <K>{};
final unique = <MapEntry<K, V>>[];
for (var entry in entries) {
if (!uniqueKeys.contains(entry.key)) {
uniqueKeys.add(entry.key);
unique.add(MapEntry(entry.key, entry.value));
}
}
return unique;
}