MapUtils class

Utility class for map operations.

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Methods

countItems<K, V>(Map<K, Iterable<V>> inputMap) int
Counts total items across all iterable values in a map.
mapAddValue<K, V>(Map<K, List<V>> map, K key, V value) → void
Adds a value to a map of lists.
mapContainsValue<K, V>(Map<K, List<V>> map, K key, V value) bool
Checks if a map of lists contains a specific value.
mapRemoveValue<K, V>(Map<K, List<V>> map, K key, V value) → void
Removes a value from a map of lists.
mapToggleValue<K, V>(Map<K, List<V>> map, K key, V value, {bool? add}) → void
Toggles a value in a map of lists.
toMapStringDynamic(dynamic json, {bool ensureUniqueKey = false}) Map<String, dynamic>?
Converts dynamic to Map<String, dynamic>.