where method
Extracts only elements for which the return value of the callback given by test
is true
.
An object different from the original object is returned.
test
で与えたコールバックの戻り値がtrue
の要素だけを抽出します。
元のオブジェクトとは別のオブジェクトが返されます。
Implementation
Map<K, V> where(bool Function(K key, V value) test) {
return Map.from(this)..removeWhere((key, value) => !test(key, value));
}