putIgnoreCase<V> function

V? putIgnoreCase<V>(
  1. Map<String, V> map,
  2. String key,
  3. V value
)

Puts a map value ignoring key case.

Implementation

V? putIgnoreCase<V>(Map<String, V> map, String key, V value) {
  var entry = getEntryIgnoreCase(map, key);
  if (entry != null) {
    map[entry.key] = value;
    return entry.value;
  } else {
    map[key] = value;
    return null;
  }
}