MapUtils<K, V> extension

on

Methods

compact([bool newMap = false]) Map
Remove all entries that value is null
containsKeys(List<Object> keys, {ContainsKeysRules rule = ContainsKeysRules.none}) bool
Return true if map contains all keys in list of keys
diff(Map to, [bool skipNested = false]) Map
Returns a new map contend only difference between maps to Map to compare skipNested If true will skip any nested map and only process if maps is equals. Defaults value is false.
doIfContains<X>(dynamic key, {required X doWork(dynamic key, dynamic value), X elseIf()?}) → X?
Return a result of doWork if a map contains a key or return a result of elseIf if non null else will return null
putIfAbsentAsync(String key, Future<V> ifAbsent()) Future<V?>
Return a value if it exists in map or call ifAbsent that's return a new value and insert him on map
reduce<Tp>(ReduceFunction<Tp> reduceFunction) → Tp?
Reduce
removeKeys(List keys, [bool recursive = false]) → void
Remove all values that matches in list of keys
removeKeysExcept(List keys, [bool recursive = false]) → void
Remove all values except that matches in list of keys
trim([bool newMap = false]) Map
Apply trim in all String values on tree