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