Map<K, V> addIndexIf( bool Function(K key, V value, int index) f, K key, V value, int index) { if (f(key, value, index)) { addEntries([MapEntry(key, value)]); } return this; }