CombinedMapView<K, V> class

Returns a new map that represents maps flattened into a single map.

All methods and accessors treat the new map as-if it were a single concatenated map, but the underlying implementation is based on lazily accessing individual map instances. In the occasion where a key occurs in multiple maps the first value is returned.

The resulting map has an index operator ([]) that is O(maps), rather than O(1), and the map is unmodifiable, but underlying changes to these maps are still accessible from the resulting map.

The length getter is O(M) where M is the total number of entries in all maps, since it has to remove duplicate entries.

Inheritance
Available extensions

Constructors

CombinedMapView(Iterable<Map<K, V>> _maps)
Create a new combined view of multiple maps.

Properties

$ Signal<Map<K, V>>

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

Return a signal from a Map value
no setter
beautifiedJson String

Available on Map<String, dynamic>, provided by the BeautifiedJson extension

Returns a beautified JSON string representation.
no setter
encodedJsonString String

Available on Map<String, dynamic>, provided by the BeautifiedJsonMapExtension extension

no setter
encodeWithIndent String

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

Convenience getter used by ConversionException.toString().
no setter
entries Iterable<MapEntry<K, V>>
The map entries of this Map.
no setterinherited
hashCode int
The hash code for this object.
no setterinherited
isEmpty bool
Whether there is no key/value pair in the map.
no setterinherited
isEmptyOrNull bool

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

Returns true when the map is null or empty.
no setter
isNotEmpty bool
Whether there is at least one key/value pair in the map.
no setterinherited
isNotEmptyOrNull bool

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

Returns true when the map is non-null and not empty.
no setter
keys Iterable<K>
The keys of this.
no setteroverride
keysList List<K>

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

Returns a list containing all the keys in the map.
no setter
keysSet Set<K>

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

Returns a set containing all the keys in the map.
no setter
length int
The number of key/value pairs in the map.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
values Iterable<V>
The values of this Map.
no setterinherited
valuesList List<V>

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

Returns a list containing all the values in the map.
no setter
valuesSet Set<V>

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

Returns a set containing all the values in the map.
no setter

Methods

addAll(Map<K, V> other) → void
This operation is not supported by an unmodifiable map.
inherited
addEntries(Iterable<MapEntry<K, V>> entries) → void
This operation is not supported by an unmodifiable map.
inherited
cast<RK, RV>() Map<RK, RV>
Provides a view of this map as having RK keys and RV instances, if necessary.
inherited
clear() → void
This operation is not supported by an unmodifiable map.
inherited
containsKey(Object? key) bool
Whether this map contains the given key.
inherited
containsValue(Object? value) bool
Whether this map contains the given value.
inherited
convertMapToList() List

Available on Map, provided by the OnMapExtensions extension

deepMerge(Map<String, Object?> other) Map<String, Object?>

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

Deep merges this map with other and returns a new map.
elementAtIntIndex(int index) → V

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

Returns the value at the given zero-based index in iteration order. Throws if the index is out of range.
filter(bool predicate(K key, V value)) Map<K, V>

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

Filters the map, retaining only entries that satisfy the given predicate.
filterKeys(bool test(K key)) Map<K, V>

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

Keeps only entries with keys satisfying test.
filterValues(bool test(V value)) Map<K, V>

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

Keeps only entries with values satisfying test.
flatMap({String delimiter = '.', bool excludeArrays = false}) Map<String, Object?>

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

Flattens a nested map into a single-level map.
forEach(void action(K key, V value)) → void
Applies action to each key/value pair of the map.
inherited
getBigInt(K key, {List<K>? alternativeKeys, dynamic innerKey, int? innerListIndex, BigInt? defaultValue, ElementConverter<BigInt>? converter}) BigInt

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

Converts the value at key (or alternativeKeys) to BigInt.
getBool(K key, {List<K>? alternativeKeys, dynamic innerKey, int? innerListIndex, bool? defaultValue, ElementConverter<bool>? converter}) bool

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

Converts the value at key (or alternativeKeys) to bool.
getBoolOrNull(Object? key) bool?

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

getDateTime(K key, {List<K>? alternativeKeys, dynamic innerKey, int? innerListIndex, String? format, String? locale, bool autoDetectFormat = false, bool useCurrentLocale = false, bool utc = false, DateTime? defaultValue, ElementConverter<DateTime>? converter}) DateTime

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

Converts the value at key (or alternativeKeys) to DateTime.
getDouble(K key, {List<K>? alternativeKeys, dynamic innerKey, int? innerListIndex, double? defaultValue, String? format, String? locale, ElementConverter<double>? converter}) double

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

Converts the value at key (or alternativeKeys) to double.
getDoubleOrNull(Object? key) double?

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

getEnum<T extends Enum>(K key, {required T parser(dynamic), List<K>? alternativeKeys, dynamic innerKey, int? innerListIndex, T? defaultValue, Map<String, dynamic>? debugInfo}) → T

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

Converts the value at key (or alternativeKeys) to an enum using parser.
getInt(K key, {List<K>? alternativeKeys, dynamic innerKey, int? innerListIndex, int? defaultValue, String? format, String? locale, ElementConverter<int>? converter}) int

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

Converts the value at key (or alternativeKeys) to int.
getIntOrNull(Object? key) int?

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

getList<T>(K key, {List<K>? alternativeKeys, dynamic innerKey, int? innerListIndex, List<T>? defaultValue, ElementConverter<T>? elementConverter}) List<T>

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

Converts the value at key (or alternativeKeys) to a List of T.
getMap<K2, V2>(K key, {List<K>? alternativeKeys, dynamic innerKey, int? innerListIndex, Map<K2, V2>? defaultValue, ElementConverter<K2>? keyConverter, ElementConverter<V2>? valueConverter}) Map<K2, V2>

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

Converts the value at key (or alternativeKeys) to a Map of K2 to V2.
getNum(K key, {List<K>? alternativeKeys, dynamic innerKey, int? innerListIndex, num? defaultValue, String? format, String? locale, ElementConverter<num>? converter}) num

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

Converts the value at key (or alternativeKeys) to num.
getPath(String path, {String delimiter = '.', bool parseIndices = true}) Object?

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

Reads a value from a nested map using path (e.g., "a.b.c").
getSet<T>(K key, {List<K>? alternativeKeys, dynamic innerKey, int? innerListIndex, Set<T>? defaultValue, ElementConverter<T>? elementConverter}) Set<T>

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

Converts the value at key (or alternativeKeys) to a Set of T.
getString(K key, {List<K>? alternativeKeys, dynamic innerKey, int? innerListIndex, String? defaultValue, ElementConverter<String>? converter}) String

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

Converts the value at key (or alternativeKeys) to String.
getString(Object? key) String?

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

getUri(K key, {List<K>? alternativeKeys, dynamic innerKey, int? innerListIndex, Uri? defaultValue, ElementConverter<Uri>? converter}) Uri

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

Converts the value at key (or alternativeKeys) to Uri.
inj({bool autoDisposeWhenNotUsed = true}) ReactiveModel<Map<T, D>>

Available on Map<T, D>, provided by the MapX extension

create a ReactiveModel state
intlSelect(Object choice, {String? desc, Map<String, Object>? examples, String? locale, String? name, List<Object>? args, String? meaning, bool? skip}) String

Available on Map<Object, String>, provided by the IntlMapStringExtension extension

Format a message differently depending on choice.
intlSelectLogic(Object choice) → T

Available on Map<Object, T>, provided by the IntlMapExtension extension

Internal: Implements the logic for select - use intlSelect for normal messages.
isPrimitive() bool

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

Returns true when every key and value is a primitive value.
joinWithMap(String separator, {String keyValueSeparator = '='}) String

Available on Map<String, dynamic>, provided by the MapExt extension

keysWhere(bool condition(V)) Iterable<K>

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

Returns an iterable of keys where the associated values satisfy the given condition.
map<K2, V2>(MapEntry<K2, V2> transform(K key, V value)) Map<K2, V2>
Returns a new map where all entries of this map are transformed by the given convert function.
inherited
mapKeys<K2>(K2 transform(K key, V value)) Map<K2, V>

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

Returns a new map with transformed keys.
mapValues<V2>(V2 transform(K key, V value)) Map<K, V2>

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

Returns a new map with transformed values.
mapValues<V2>(V2 transform(V)) Map<K, V2>

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

Transforms the values in this map using the given function.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
parse<T, K2, V2>(K key, T converter(Map<K2, V2> json)) → T

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

Parses the nested map at key using the provided converter.
putIfAbsent(K key, V ifAbsent()) → V
This operation is not supported by an unmodifiable map.
inherited
remove(Object? key) → V?
This operation is not supported by an unmodifiable map.
inherited
removeWhere(bool test(K key, V value)) → void
This operation is not supported by an unmodifiable map.
inherited
setIfMissing(K key, V value) → V

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

Inserts a key-value pair into the map if the key does not already exist.
setPath(String path, Object? value, {String delimiter = '.', bool parseIndices = true}) bool

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

Writes a value into a nested map using path (e.g., "a.b.c").
swapKeysWithValues() Map<V, K>

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

Swaps the keys with values in the map. Note: If there are duplicate values, the last key-value pair will be kept.
toJson() String

Available on Map<String, TimeOfDay>, provided by the MapStringTimeOfDayJsonExtension extension

toJsonMap({JsonOptions options = const JsonOptions(), Object? toEncodable(dynamic object)?}) Map<String, dynamic>

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

Converts this map to a Map<String, dynamic> with JSON-encodable values.
toJsonString({String? indent, JsonOptions options = const JsonOptions(), Object? toEncodable(dynamic object)?}) String

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

Converts this map to a JSON string (pretty if indent is provided).
toSignal({String? debugLabel, bool autoDispose = false}) MapSignal<K, V>

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

Convert an existing list to MapSignal
toString() String
A string representation of this object.
inherited
tryGetBigInt(K key, {List<K>? alternativeKeys, dynamic innerKey, int? innerListIndex, BigInt? defaultValue, ElementConverter<BigInt>? converter}) BigInt?

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

Tries to convert the value at key (or alternativeKeys) to BigInt.
tryGetBool(K key, {List<K>? alternativeKeys, dynamic innerKey, int? innerListIndex, bool? defaultValue, ElementConverter<bool>? converter}) bool?

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

Tries to convert the value at key (or alternativeKeys) to bool.
tryGetDateTime(K key, {List<K>? alternativeKeys, dynamic innerKey, int? innerListIndex, String? format, String? locale, bool autoDetectFormat = false, bool useCurrentLocale = false, bool utc = false, DateTime? defaultValue, ElementConverter<DateTime>? converter}) DateTime?

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

Tries to convert the value at key (or alternativeKeys) to DateTime.
tryGetDouble(K key, {List<K>? alternativeKeys, dynamic innerKey, int? innerListIndex, double? defaultValue, String? format, String? locale, ElementConverter<double>? converter}) double?

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

Tries to convert the value at key (or alternativeKeys) to double.
tryGetEnum<T extends Enum>(K key, {required T parser(dynamic), List<K>? alternativeKeys, dynamic innerKey, int? innerListIndex, T? defaultValue, Map<String, dynamic>? debugInfo}) → T?

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

Tries to convert the value at key (or alternativeKeys) to an enum using parser.
tryGetInt(K key, {List<K>? alternativeKeys, dynamic innerKey, int? innerListIndex, int? defaultValue, String? format, String? locale, ElementConverter<int>? converter}) int?

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

Tries to convert the value at key (or alternativeKeys) to int.
tryGetList<T>(K key, {List<K>? alternativeKeys, dynamic innerKey, int? innerListIndex, List<T>? defaultValue, ElementConverter<T>? elementConverter}) List<T>?

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

Tries to convert the value at key (or alternativeKeys) to a List of T.
tryGetMap<K2, V2>(K key, {List<K>? alternativeKeys, dynamic innerKey, int? innerListIndex, Map<K2, V2>? defaultValue, ElementConverter<K2>? keyConverter, ElementConverter<V2>? valueConverter}) Map<K2, V2>?

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

Tries to convert the value at key (or alternativeKeys) to a Map of K2 to V2.
tryGetNum(K key, {List<K>? alternativeKeys, dynamic innerKey, int? innerListIndex, num? defaultValue, String? format, String? locale, ElementConverter<num>? converter}) num?

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

Tries to convert the value at key (or alternativeKeys) to num.
tryGetSet<T>(K key, {List<K>? alternativeKeys, dynamic innerKey, int? innerListIndex, Set<T>? defaultValue, ElementConverter<T>? elementConverter}) Set<T>?

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

Tries to convert the value at key (or alternativeKeys) to a Set of T.
tryGetString(K key, {List<K>? alternativeKeys, dynamic innerKey, int? innerListIndex, String? defaultValue, ElementConverter<String>? converter}) String?

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

Tries to convert the value at key (or alternativeKeys) to String.
tryGetUri(K key, {List<K>? alternativeKeys, dynamic innerKey, int? innerListIndex, Uri? defaultValue, ElementConverter<Uri>? converter}) Uri?

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

Tries to convert the value at key (or alternativeKeys) to Uri.
tryParse<T, K2, V2>(K key, T converter(Map<K2, V2> json)) → T?

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

Tries to parse the nested map at key using the provided converter.
unflatten({String delimiter = '.', bool parseIndices = true}) Map<String, Object?>

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

Rebuilds a nested map from a flattened map.
update(K key, V update(V value), {V ifAbsent()?}) → V
This operation is not supported by an unmodifiable map.
inherited
updateAll(V update(K key, V value)) → void
This operation is not supported by an unmodifiable map.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited
operator [](Object? key) → V?
The value for the given key, or null if key is not in the map.
override
operator []=(K key, V value) → void
This operation is not supported by an unmodifiable map.
inherited