keysWhere method
Returns a list of keys that match the predicate.
Example:
{'a': 1, 'b': 2, 'c': 3}.keysWhere((k, v) => v > 1);
// ['b', 'c']
Implementation
List<K> keysWhere(bool Function(K, V) test) {
final List<K> keys = <K>[];
forEach((K key, V value) {
if (test(key, value)) {
keys.add(key);
}
});
return keys;
}