MapSignalMixin<K, V> mixin
A mixin that provides reactive map functionality.
This mixin implements all Map operations while maintaining reactivity. Any modification to the map will automatically notify subscribers. All mutating operations trigger change notifications.
- Implemented types
-
- MapBase<
K, V> - Readonly<
Map< K, V> > - IMutableCollection
- MapBase<
- Available extensions
Properties
-
entries
→ Iterable<
MapEntry< K, V> > -
The map entries of this map.
no setteroverride
- hashCode → int
-
The hash code for this object.
no setterinherited
- isEmpty → bool
-
Whether this map is empty.
no setteroverride
- isNotEmpty → bool
-
Whether this map is not empty.
no setteroverride
-
keys
→ Iterable<
K> -
The keys of this map.
no setteroverride
- length → int
-
The number of key-value pairs in the map.
no setteroverride
-
peek
→ Map<
K, V> -
Gets the current value without establishing a reactive dependency.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
value
→ Map<
K, V> -
Gets the current value and establishes a reactive dependency.
no setterinherited
-
values
→ Iterable<
V> -
The values of this map.
no setteroverride
Methods
-
addAll(
Map< K, V> other) → void -
Adds all key-value pairs from the given map to this map.
override
-
addEntries(
Iterable< MapEntry< newEntries) → voidK, V> > -
Adds all entries from the given iterable to this map.
override
-
cast<
RK, RV> () → Map< RK, RV> -
Returns a view of this map as having
RKkeys andRVinstances.override -
clear(
) → void -
Removes all entries from the map.
override
-
containsKey(
Object? key) → bool -
Returns true if this map contains the given key.
override
-
containsValue(
Object? targetValue) → bool -
Returns true if this map contains the given value.
override
-
forEach(
void action(K key, V value)) → void -
Applies the given function to each key-value pair in the map.
override
-
get(
) → Map< K, V> -
Gets the current value and establishes a reactive dependency.
inherited
-
map<
K2, V2> (MapEntry< K2, V2> convert(K key, V value)) → Map<K2, V2> -
Returns a new map where each entry is transformed by the given function.
override
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
notify(
) → void -
Manually notifies all subscribers that this value has changed.
inherited
-
putIfAbsent(
K key, V ifAbsent()) → V -
Look up the value of
key, or add a new entry if it isn't there.override -
remove(
Object? key) → V? -
Removes the entry for the given key and returns its value.
override
-
removeWhere(
bool test(K key, V value)) → void -
Removes all entries that satisfy the given test.
override
-
toMapSignal(
) → MapSignal< K, V> -
Available on Map<
Converts this map to a reactive map signal.K, V> , provided by the JoltMapExtension extension -
toString(
) → String -
A string representation of this object.
inherited
-
update(
K key, V update(V value), {V ifAbsent()?}) → V -
Updates the value for the given key.
override
-
updateAll(
V update(K key, V value)) → void -
Updates all values in the map.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
-
operator [](
Object? key) → V? -
Gets the value associated with the given key.
override
-
operator []=(
K key, V value) → void -
Sets the value associated with the given key.
override