MapUtils extension

on

Properties

isEmpty bool

Available on Map, provided by the MapUtils extension

Returns true if the map is empty, false otherwise.
no setter

Methods

camelCaseKeys<V>() Map<String, V>

Available on Map, provided by the MapUtils extension

Camel case all keys in the map. Returns a new map with camel cased keys.
camelCaseValues<K>() Map<K, String>

Available on Map, provided by the MapUtils extension

Camel case all values in the map. Returns a new map with camel cased values.
capitalizeKeys<V>() Map<String, V>

Available on Map, provided by the MapUtils extension

Capitalize all keys in the map. Returns a new map with capitalized keys.
capitalizeValues<K>() Map<K, String>

Available on Map, provided by the MapUtils extension

Capitalize all values in the map. Returns a new map with capitalized values.
contains(Object key, Object value) bool

Available on Map, provided by the MapUtils extension

Returns true if the map contains the specified key and value, false otherwise.
filter<K, V>(bool predicate(K key, V value)) Map<K, V>

Available on Map, provided by the MapUtils extension

Returns a new map with all entries that satisfy the given predicate. The entries in the resulting map preserve the order of the original map.
filterEmpty<K, V>() Map<K, V>

Available on Map, provided by the MapUtils extension

Filter empty values from the map. Returns a new map with non-empty values.
filterKeys<K, V>(Iterable<K> keys) Map<K, V>

Available on Map, provided by the MapUtils extension

Filter where the key is in the given keys. Returns a new map with filtered entries.
filterNot<K, V>(bool predicate(K key, V value)) Map<K, V>

Available on Map, provided by the MapUtils extension

Returns a new map with all entries that satisfy the given predicate. The entries in the resulting map do not preserve the order of the original map.
filterNull<K, V>() Map<K, V>

Available on Map, provided by the MapUtils extension

Filter null values from the map. Returns a new map with non-null values.
filterValues<K, V>(Iterable<V> values) Map<K, V>

Available on Map, provided by the MapUtils extension

Filter where the value is in the given values. Returns a new map with filtered entries.
kebabCaseKeys<V>() Map<String, V>

Available on Map, provided by the MapUtils extension

Kebab case all keys in the map. Returns a new map with kebab cased keys.
kebabCaseValues<K>() Map<K, String>

Available on Map, provided by the MapUtils extension

Kebab case all values in the map. Returns a new map with kebab cased values.
partition<K, V>(bool predicate(K key, V value)) Pair<Map<K, V>, Map<K, V>>

Available on Map, provided by the MapUtils extension

Split map into two maps based on the predicate. Returns a list of two maps.
prefixKeys<V>(String prefix) Map<String, V>

Available on Map, provided by the MapUtils extension

Add prefix to all keys in the map. Returns a new map with prefixed keys.
prefixValues<K>(String prefix) Map<K, String>

Available on Map, provided by the MapUtils extension

Add prefix to all values in the map. Returns a new map with prefixed values.
printDebug<K, V>({String label = 'Map', String separator = ': ', String indent = ' '}) → void

Available on Map, provided by the MapUtils extension

debug print the map with label and separator. label is the label for the map. separator is the separator between key and value. indent is the indent for each line.
reject<K, V>(bool predicate(K key, V value)) Map<K, V>

Available on Map, provided by the MapUtils extension

Returns a new map with all entries that do not satisfy the given predicate. The entries in the resulting map preserve the order of the original map.
rejectKeys<K, V>(Iterable<K> keys) Map<K, V>

Available on Map, provided by the MapUtils extension

Filter where the key is not in the given keys. Returns a new map with filtered entries.
rejectNot<K, V>(bool predicate(K key, V value)) Map<K, V>

Available on Map, provided by the MapUtils extension

Returns a new map with all entries that do not satisfy the given predicate. The entries in the resulting map do not preserve the order of the original map.
rejectValues<K, V>(Iterable<V> values) Map<K, V>

Available on Map, provided by the MapUtils extension

Filter where the value is not in the given values. Returns a new map with filtered entries.
removeExact({required Object key, required Object value}) bool

Available on Map, provided by the MapUtils extension

Returns true if the map contains the specified key and value and removes the entry, false otherwise.
shift<K, V>() MapEntry<K, V>

Available on Map, provided by the MapUtils extension

Shift the first entry from the map.
snakeCaseKeys<V>() Map<String, V>

Available on Map, provided by the MapUtils extension

Snake case all keys in the map. Returns a new map with snake cased keys.
snakeCaseValues<K>() Map<K, String>

Available on Map, provided by the MapUtils extension

Snake case all values in the map. Returns a new map with snake cased values.
suffixKeys<V>(String suffix) Map<String, V>

Available on Map, provided by the MapUtils extension

Add suffix to all keys in the map. Returns a new map with suffixed keys.
suffixValues<K>(String suffix) Map<K, String>

Available on Map, provided by the MapUtils extension

Add suffix to all values in the map. Returns a new map with suffixed values.
uniqueValues<K, V>() Map<K, V>

Available on Map, provided by the MapUtils extension

Remove duplicate values from the map. Returns a new map with unique values.