getAllPresent method

Map<K, V> getAllPresent(
  1. List<K> keys
)

Implementation

Map<K, V> getAllPresent(List<K> keys) {
  final Map<K, V> cachedValues = {};

  keys.forEach((keyToFind) {
    final value = getIfPresent(keyToFind);
    if (value != null) {
      cachedValues[keyToFind] = value;
    }
  });

  return cachedValues;
}