MapExtensions class abstract final

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
Returns the total number of items across all iterable values in inputMap.
mapAddValue<K, V>({required Map<K, List<V>> map, required K key, required V value}) → void
Adds value to the list at key within map, creating the list if absent.
mapContainsValue<K, V>({required Map<K, List<V>> map, required K key, required V value}) bool
Returns true if the list at key within map contains value.
mapRemoveValue<K, V>({required Map<K, List<V>> map, required K key, required V value}) → void
Removes all occurrences of value from the list at key within map.
mapToggleValue<K, V>({required Map<K, List<V>> map, required K key, required V value, bool? add}) → void
Toggles value in the list at key within map.
toMapStringDynamic(dynamic json, {bool ensureUniqueKey = false, bool throwOnDuplicate = false}) Map<String, dynamic>?
Returns json as a Map<String, dynamic>, or null if conversion is not possible.