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