MapSignal<K, V> class
- Inheritance
- Implemented types
-
- Map<
K, V>
- Map<
- Mixed-in types
-
- MapSignalMixin<
K, V, Map< K, V> >
- MapSignalMixin<
- Available extensions
- BeautifiedJson
- BeautifiedJsonMapExtension
- DHUMapExt
- DHUMapExtension
- DHUMapNullableExtension
- GetByKeyIndex
- IntlMapExtension
- IntlMapStringExtension
- JsonMapX
- MapConversionX
- MapExt
- MapSignalExtension
- MapStringTimeOfDayJsonExtension
- MapX
- NullableMapConversionX
- OnMapExtensions
- ReadonlyMapSignalExtension
- SignalMapExtensions
- SignalMapUtils
Constructors
Properties
-
$
→ Signal<
Map< K, V> > -
Available on Map<
Return a signal from a Map valueK, V> , provided by the SignalMapExtensions extensionno setter - autoDispose ↔ bool
-
Throws and error if read after dispose and can be
disposed on last unsubscribe.
getter/setter pairinherited
- beautifiedJson → String
-
Available on Map<
Returns a beautified JSON string representation.String, dynamic> , provided by the BeautifiedJson extensionno setter - debugLabel → String?
-
Debug label for Debug Mode
finalinherited
- disposed ↔ bool
-
Check if the effect is disposed
getter/setter pairinherited
- encodedJsonString → String
-
Available on Map<
String, dynamic> , provided by the BeautifiedJsonMapExtension extensionno setter - encodeWithIndent → String
-
Available on Map<
Convenience getter used byK, V> , provided by the JsonMapX extensionConversionException.toString().no setter -
entries
→ Iterable<
MapEntry< K, V> > -
The map entries of this Map.
no setterinherited
-
entries
→ Iterable<
MapEntry< K, V> > -
Available on ReadonlySignal<
Map< , provided by the ReadonlyMapSignalExtension extensionK, V> >no setter -
equalityCheck
↔ bool Function(Map<
K, V> a, Map<K, V> b) -
Optional method to check if to values are the same
getter/setter pairinherited
- globalId → int
-
finalinherited
- hashCode → int
-
The hash code for this object.
no setteroverride
-
internalValue
→ Map<
K, V> -
no setterinherited
- isEmpty → bool
-
Whether there is no key/value pair in the map.
no setterinherited
- isEmpty → bool
-
Available on ReadonlySignal<
Map< , provided by the ReadonlyMapSignalExtension extensionK, V> >no setter - isEmptyOrNull → bool
-
Available on Map<
ReturnsK, V> ?, provided by the DHUMapNullableExtension extensiontruewhen the map isnullor empty.no setter - isInitialized → bool
-
Check if a signal value is set (does not subscribe)
no setterinherited
- isNotEmpty → bool
-
Whether there is at least one key/value pair in the map.
no setterinherited
- isNotEmpty → bool
-
Available on ReadonlySignal<
Map< , provided by the ReadonlyMapSignalExtension extensionK, V> >no setter - isNotEmptyOrNull → bool
-
Available on Map<
ReturnsK, V> ?, provided by the DHUMapNullableExtension extensiontruewhen the map is non-null and not empty.no setter -
keys
→ Iterable<
K> -
The keys of this Map.
no setterinherited
-
keys
→ Iterable<
K> -
Available on ReadonlySignal<
Map< , provided by the ReadonlyMapSignalExtension extensionK, V> >no setter -
keysList
→ List<
K> -
Available on Map<
Returns a list containing all the keys in the map.K, V> , provided by the MapConversionX extensionno setter -
keysSet
→ Set<
K> -
Available on Map<
Returns a set containing all the keys in the map.K, V> , provided by the MapConversionX extensionno setter - length → int
-
The number of key/value pairs in the map.
no setterinherited
- length → int
-
Available on ReadonlySignal<
Map< , provided by the ReadonlyMapSignalExtension extensionK, V> >no setter - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
value
↔ Map<
K, V> -
Compute the current value
getter/setter pairinherited
-
values
→ Iterable<
V> -
The values of this Map.
no setterinherited
-
values
→ Iterable<
V> -
Available on ReadonlySignal<
Map< , provided by the ReadonlyMapSignalExtension extensionK, V> >no setter -
valuesList
→ List<
V> -
Available on Map<
Returns a list containing all the values in the map.K, V> , provided by the MapConversionX extensionno setter -
valuesSet
→ Set<
V> -
Available on Map<
Returns a set containing all the values in the map.K, V> , provided by the MapConversionX extensionno setter - version ↔ int
-
Version numbers should always be >= 0, because the special value -1 is used
by Nodes to signify potentially unused but recyclable nodes.
getter/setter pairinherited
Methods
-
addAll(
Map< K, V> other) → void -
Available on Signal<
Map< , provided by the MapSignalExtension extensionK, V> > -
addAll(
Map< K, V> other) → void -
Adds all key/value pairs of
otherto this map.inherited -
addEntries(
Iterable< MapEntry< newEntries) → voidK, V> > -
Available on Signal<
Map< , provided by the MapSignalExtension extensionK, V> > -
addEntries(
Iterable< MapEntry< newEntries) → voidK, V> > -
Adds all key/value pairs of
newEntriesto this map.inherited -
afterCreate(
Map< K, V> val) → void -
Internal hook for after a signal is created
inherited
-
beforeUpdate(
Map< K, V> val) → void -
Internal hook for after a signal is updated
inherited
-
call(
) → Map< K, V> -
Return the value when invoked
inherited
-
cast<
RK, RV> () → Map< RK, RV> -
Available on ReadonlySignal<
Map< , provided by the ReadonlyMapSignalExtension extensionK, V> > -
cast<
RK, RV> () → Map< RK, RV> -
Provides a view of this map as having
RKkeys andRVinstances, if necessary.inherited -
clear(
) → void -
Available on Signal<
Map< , provided by the MapSignalExtension extensionK, V> > -
clear(
) → void -
Removes all entries from the map.
inherited
-
containsKey(
Object? key) → bool -
Whether this map contains the given
key.inherited -
containsKey(
Object? key) → bool -
Available on ReadonlySignal<
Map< , provided by the ReadonlyMapSignalExtension extensionK, V> > -
containsValue(
Object? value) → bool -
Whether this map contains the given
value.inherited -
containsValue(
Object? value) → bool -
Available on ReadonlySignal<
Map< , provided by the ReadonlyMapSignalExtension extensionK, V> > -
convertMapToList(
) → List -
Available on Map, provided by the OnMapExtensions extension
-
deepMerge(
Map< String, Object?> other) → Map<String, Object?> -
Available on Map<
Deep merges this map withK, V> , provided by the DHUMapExt extensionotherand returns a new map. -
dispose(
) → void -
Dispose the signal
inherited
-
elementAtIntIndex(
int index) → V -
Available on Map<
Returns the value at the given zero-basedK, V> , provided by the GetByKeyIndex extensionindexin iteration order. Throws if the index is out of range. -
filter(
bool predicate(K key, V value)) → Map< K, V> -
Available on Map<
Filters the map, retaining only entries that satisfy the given predicate.K, V> , provided by the DHUMapExtension extension -
flatMap(
{String delimiter = '.', bool excludeArrays = false}) → Map< String, Object?> - Flattens a nested map into a single-level map.
-
forEach(
void action(K key, V value)) → void -
Applies
actionto each key/value pair of the map.inherited -
forEach(
void action(K key, V value)) → void -
Available on Signal<
Map< , provided by the MapSignalExtension extensionK, V> > -
get(
) → Map< K, V> -
Helper method to get the current value
inherited
-
getBigInt(
K key, {List< K> ? alternativeKeys, dynamic innerKey, int? innerListIndex, BigInt? defaultValue, ElementConverter<BigInt> ? converter}) → BigInt -
Available on Map<
Converts the value atK, V> , provided by the MapConversionX extensionkey(oralternativeKeys) to BigInt. -
getBool(
K key, {List< K> ? alternativeKeys, dynamic innerKey, int? innerListIndex, bool? defaultValue, ElementConverter<bool> ? converter}) → bool -
Available on Map<
Converts the value atK, V> , provided by the MapConversionX extensionkey(oralternativeKeys) to bool. -
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<
Converts the value atK, V> , provided by the MapConversionX extensionkey(oralternativeKeys) 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<
Converts the value atK, V> , provided by the MapConversionX extensionkey(oralternativeKeys) to double. -
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<
Converts the value atK, V> , provided by the MapConversionX extensionkey(oralternativeKeys) to an enum usingparser. -
getInt(
K key, {List< K> ? alternativeKeys, dynamic innerKey, int? innerListIndex, int? defaultValue, String? format, String? locale, ElementConverter<int> ? converter}) → int -
Available on Map<
Converts the value atK, V> , provided by the MapConversionX extensionkey(oralternativeKeys) to int. -
getList<
T> (K key, {List< K> ? alternativeKeys, dynamic innerKey, int? innerListIndex, List<T> ? defaultValue, ElementConverter<T> ? elementConverter}) → List<T> -
Available on Map<
Converts the value atK, V> , provided by the MapConversionX extensionkey(oralternativeKeys) to a List ofT. -
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<
Converts the value atK, V> , provided by the MapConversionX extensionkey(oralternativeKeys) to a Map ofK2toV2. -
getNum(
K key, {List< K> ? alternativeKeys, dynamic innerKey, int? innerListIndex, num? defaultValue, String? format, String? locale, ElementConverter<num> ? converter}) → num -
Available on Map<
Converts the value atK, V> , provided by the MapConversionX extensionkey(oralternativeKeys) to num. -
getPath(
String path, {String delimiter = '.', bool parseIndices = true}) → Object? -
Available on Map<
Reads a value from a nested map usingK, V> , provided by the DHUMapExt extensionpath(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<
Converts the value atK, V> , provided by the MapConversionX extensionkey(oralternativeKeys) to a Set ofT. -
getString(
K key, {List< K> ? alternativeKeys, dynamic innerKey, int? innerListIndex, String? defaultValue, ElementConverter<String> ? converter}) → String -
Available on Map<
Converts the value atK, V> , provided by the MapConversionX extensionkey(oralternativeKeys) to String. -
getUri(
K key, {List< K> ? alternativeKeys, dynamic innerKey, int? innerListIndex, Uri? defaultValue, ElementConverter<Uri> ? converter}) → Uri -
Available on Map<
Converts the value atK, V> , provided by the MapConversionX extensionkey(oralternativeKeys) to Uri. -
inj(
{bool autoDisposeWhenNotUsed = true}) → ReactiveModel< Map< T, D> > -
Available on Map<
create a ReactiveModel stateT, D> , provided by the MapX extension -
internalRefresh(
) → bool -
inherited
-
intlSelect(
Object choice, {String? desc, Map< String, Object> ? examples, String? locale, String? name, List<Object> ? args, String? meaning, bool? skip}) → String -
Available on Map<
Format a message differently depending onObject, String> , provided by the IntlMapStringExtension extensionchoice. -
intlSelectLogic(
Object choice) → T -
Available on Map<
Internal: Implements the logic forObject, T> , provided by the IntlMapExtension extensionselect- useintlSelectfor normal messages. -
isPrimitive(
) → bool -
Available on Map<
ReturnsK, V> ?, provided by the DHUMapNullableExtension extensiontruewhen 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<
Returns an iterable of keys where the associated values satisfy the given condition.K, V> , provided by the DHUMapExtension extension -
map<
K2, V2> (MapEntry< K2, V2> convert(K key, V value)) → Map<K2, V2> -
Returns a new map where all entries of this map are transformed by
the given
convertfunction.inherited -
map<
K2, V2> (MapEntry< K2, V2> convert(K key, V value)) → Map<K2, V2> -
Available on ReadonlySignal<
Map< , provided by the ReadonlyMapSignalExtension extensionK, V> > -
mapValues<
V2> (V2 transform(V)) → Map< K, V2> -
Available on Map<
Transforms the values in this map using the given function.K, V> , provided by the DHUMapExtension extension -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
onDispose(
void cleanup()) → void Function() -
Add a cleanup function to be called when the signal is disposed
inherited
-
overrideWith(
Map< K, V> val) → Signal<Map< K, V> > -
Override the current signal with a new value as if it was created with it
inherited
-
parse<
T, K2, V2> (K key, T converter(Map< K2, V2> json)) → T -
Available on Map<
Parses the nested map atK, V> , provided by the MapConversionX extensionkeyusing the providedconverter. -
peek(
) → Map< K, V> -
In the rare instance that you have an effect that should write to another signal based on the previous value, but you don't want the effect to be subscribed to that signal, you can read a signals's previous value via
signal.peek().inherited -
putIfAbsent(
K key, V ifAbsent()) → V -
Look up the value of
key, or add a new entry if it isn't there.inherited -
putIfAbsent(
K key, V ifAbsent()) → V -
Available on Signal<
Map< , provided by the MapSignalExtension extensionK, V> > -
readonly(
) → ReadonlySignal< Map< K, V> > -
Returns a readonly signal
inherited
-
remove(
Object? key) → V? -
Removes
keyand its associated value, if present, from the map.inherited -
remove(
Object? key) → V? -
Available on Signal<
Map< , provided by the MapSignalExtension extensionK, V> > -
removeWhere(
bool test(K key, V value)) → void -
Available on Signal<
Map< , provided by the MapSignalExtension extensionK, V> > -
removeWhere(
bool test(K key, V value)) → void -
Removes all entries of this map that satisfy the given
test.inherited -
set(
Map< K, V> val, {bool force = false}) → bool -
Set the current value by a method
inherited
-
setIfMissing(
K key, V value) → V -
Available on Map<
Inserts a key-value pair into the map if the key does not already exist.K, V> , provided by the DHUMapExtension extension -
setPath(
String path, Object? value, {String delimiter = '.', bool parseIndices = true}) → bool -
Available on Map<
Writes a value into a nested map usingK, V> , provided by the DHUMapExt extensionpath(e.g., "a.b.c"). -
subscribe(
void fn(Map< K, V> value)) → void Function() -
Subscribe to value changes with a dispose function
inherited
-
subscribeToNode(
Node node) → void -
inherited
-
swapKeysWithValues(
) → Map< V, K> -
Available on Map<
Swaps the keys with values in the map. Note: If there are duplicate values, the last key-value pair will be kept.K, V> , provided by the DHUMapExtension extension -
toJson(
) → String -
Available on Map<
String, TimeOfDay> , provided by the MapStringTimeOfDayJsonExtension extension -
toJson(
) → dynamic -
Convert value to JSON
inherited
-
toJsonMap(
{JsonOptions options = const JsonOptions(), Object? toEncodable(dynamic object)?}) → Map< String, dynamic> -
Available on Map<
Converts this map to aK, V> , provided by the JsonMapX extensionMap<String, dynamic>with JSON-encodable values. -
toJsonString(
{String? indent, JsonOptions options = const JsonOptions(), Object? toEncodable(dynamic object)?}) → String -
Available on Map<
Converts this map to a JSON string (pretty ifK, V> , provided by the JsonMapX extensionindentis provided). -
toMap(
) → Map< K, V> -
Snapshot of
MapEntriesinherited -
toSignal(
{String? debugLabel, bool autoDispose = false}) → MapSignal< K, V> -
Available on Map<
Convert an existing list to MapSignalK, V> , provided by the SignalMapUtils extension -
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<
Tries to convert the value atK, V> ?, provided by the NullableMapConversionX extensionkey(oralternativeKeys) to BigInt. -
tryGetBool(
K key, {List< K> ? alternativeKeys, dynamic innerKey, int? innerListIndex, bool? defaultValue, ElementConverter<bool> ? converter}) → bool? -
Available on Map<
Tries to convert the value atK, V> ?, provided by the NullableMapConversionX extensionkey(oralternativeKeys) 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<
Tries to convert the value atK, V> ?, provided by the NullableMapConversionX extensionkey(oralternativeKeys) 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<
Tries to convert the value atK, V> ?, provided by the NullableMapConversionX extensionkey(oralternativeKeys) 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<
Tries to convert the value atK, V> ?, provided by the NullableMapConversionX extensionkey(oralternativeKeys) to an enum usingparser. -
tryGetInt(
K key, {List< K> ? alternativeKeys, dynamic innerKey, int? innerListIndex, int? defaultValue, String? format, String? locale, ElementConverter<int> ? converter}) → int? -
Available on Map<
Tries to convert the value atK, V> ?, provided by the NullableMapConversionX extensionkey(oralternativeKeys) to int. -
tryGetList<
T> (K key, {List< K> ? alternativeKeys, dynamic innerKey, int? innerListIndex, List<T> ? defaultValue, ElementConverter<T> ? elementConverter}) → List<T> ? -
Available on Map<
Tries to convert the value atK, V> ?, provided by the NullableMapConversionX extensionkey(oralternativeKeys) to a List ofT. -
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<
Tries to convert the value atK, V> ?, provided by the NullableMapConversionX extensionkey(oralternativeKeys) to a Map ofK2toV2. -
tryGetNum(
K key, {List< K> ? alternativeKeys, dynamic innerKey, int? innerListIndex, num? defaultValue, String? format, String? locale, ElementConverter<num> ? converter}) → num? -
Available on Map<
Tries to convert the value atK, V> ?, provided by the NullableMapConversionX extensionkey(oralternativeKeys) to num. -
tryGetSet<
T> (K key, {List< K> ? alternativeKeys, dynamic innerKey, int? innerListIndex, Set<T> ? defaultValue, ElementConverter<T> ? elementConverter}) → Set<T> ? -
Available on Map<
Tries to convert the value atK, V> ?, provided by the NullableMapConversionX extensionkey(oralternativeKeys) to a Set ofT. -
tryGetString(
K key, {List< K> ? alternativeKeys, dynamic innerKey, int? innerListIndex, String? defaultValue, ElementConverter<String> ? converter}) → String? -
Available on Map<
Tries to convert the value atK, V> ?, provided by the NullableMapConversionX extensionkey(oralternativeKeys) to String. -
tryGetUri(
K key, {List< K> ? alternativeKeys, dynamic innerKey, int? innerListIndex, Uri? defaultValue, ElementConverter<Uri> ? converter}) → Uri? -
Available on Map<
Tries to convert the value atK, V> ?, provided by the NullableMapConversionX extensionkey(oralternativeKeys) to Uri. -
tryParse<
T, K2, V2> (K key, T converter(Map< K2, V2> json)) → T? -
Available on Map<
Tries to parse the nested map atK, V> , provided by the MapConversionX extensionkeyusing the providedconverter. -
unflatten(
{String delimiter = '.', bool parseIndices = true}) → Map< String, Object?> - Rebuilds a nested map from a flattened map.
-
unsubscribeFromNode(
Node node) → void -
inherited
-
update(
K key, V update(V value), {V ifAbsent()?}) → V -
Available on Signal<
Map< , provided by the MapSignalExtension extensionK, V> > -
update(
K key, V update(V value), {V ifAbsent()?}) → V -
Updates the value for the provided
key.inherited -
updateAll(
V update(K key, V value)) → void -
Available on Signal<
Map< , provided by the MapSignalExtension extensionK, V> > -
updateAll(
V update(K key, V value)) → void -
Updates all values.
inherited
Operators
-
operator &(
Map< K, V> other) → MapSignal<K, V> - Fork: create a new signal with value is the concatenation of source signal and iterable parameter
-
operator <<(
Map< K, V> other) → MapSignal<K, V> - Inject: Update current signal value with iterable
-
operator ==(
Object other) → bool -
The equality operator.
override
-
operator [](
Object? key) → V? -
The value for the given
key, ornullifkeyis not in the map.inherited -
operator [](
Object? key) → V? -
Available on ReadonlySignal<
Map< , provided by the ReadonlyMapSignalExtension extensionK, V> > -
operator []=(
K key, V value) → void -
Associates the
keywith the givenvalue.inherited -
operator []=(
K key, V value) → void -
Available on Signal<
Map< , provided by the MapSignalExtension extensionK, V> > -
operator |(
Signal< Map< other) → MapSignal<K, V> >K, V> - Pipe: create a new signal by sending value from source to other