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 keys = <K>[];
forEach((key, value) {
if (test(key, value)) keys.add(key);
});
return keys;
}