getEntryIgnoreCase<V> function
Gets a map
entry ignoring key case.
Implementation
MapEntry<String, V?>? getEntryIgnoreCase<V>(Map<String, V?> map, String? key) {
if (key == null) return null;
var val = map[key];
if (val != null) return MapEntry(key, val);
var keyLC = key.toLowerCase();
for (var k in map.keys) {
if (k.toLowerCase() == keyLC) {
var value = map[k];
return MapEntry<String, V?>(k, value);
}
}
return null;
}