MapExtensions<K, V> extension

on

Methods

add(K key, V item) → void

Available on Map<K, V>, provided by the MapExtensions extension

Add item
asJson({String delimiter = '_'}) Map<String, dynamic>

Available on Map<K, V>, provided by the MapExtensions extension

Converts a Map to JSON with formatted keys (_, -, or camelCase).
computeIfAbsent(K key, V ifAbsent(K key)) → V

Available on Map<K, V>, provided by the MapExtensions extension

Computes a value for the given key if it is not already present in the map.
get(K key) → V?

Available on Map<K, V>, provided by the MapExtensions extension

Get value by key
mapKeys<K2>(K2 convert(K key)) Map<K2, V>

Available on Map<K, V>, provided by the MapExtensions extension

Applies a transformation function to the keys of the Map.
merge(Map<K, V> other) Map<K, V>

Available on Map<K, V>, provided by the MapExtensions extension

Merges another Map into the current Map, overriding duplicate keys.
put(K key, V value) → void

Available on Map<K, V>, provided by the MapExtensions extension

Add item

Static Methods

formatKeys(String key, String delimiter) String

Available on Map<K, V>, provided by the MapExtensions extension

Formats map keys (snake_case, kebab-case, camelCase)