MapSignal<K, V> class

A Signal that holds a Map.

Inheritance
Implemented types
Mixed-in types
Available extensions

Constructors

MapSignal(Map<K, V> value, {String? debugLabel, bool autoDispose = false})
Creates a MapSignal with the given value.

Properties

$ Signal<Map<K, V>>

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

Return a signal from a Map value
no setter
autoDispose bool
Throws and error if read after dispose and can be disposed on last unsubscribe.
getter/setter pairinherited
debugLabel String?
Debug label for Debug Mode
finalinherited
disposed bool
Check if the effect is disposed
getter/setter pairinherited
entries Iterable<MapEntry<K, V>>
The map entries of this Map.
no setterinherited
entries Iterable<MapEntry<K, V>>

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

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
Global ID of the signal
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<K, V>>, provided by the ReadonlyMapSignalExtension extension

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<K, V>>, provided by the ReadonlyMapSignalExtension extension

no setter
keys Iterable<K>
The keys of this Map.
no setterinherited
keys Iterable<K>

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

no setter
length int
The number of key/value pairs in the map.
no setterinherited
length int

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

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<K, V>>, provided by the ReadonlyMapSignalExtension extension

no 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
Adds all key/value pairs of other to this map.
inherited
addAll(Map<K, V> other) → void

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

addEntries(Iterable<MapEntry<K, V>> newEntries) → void
Adds all key/value pairs of newEntries to this map.
inherited
addEntries(Iterable<MapEntry<K, V>> newEntries) → void

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

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>
Provides a view of this map as having RK keys and RV instances, if necessary.
inherited
cast<RK, RV>() Map<RK, RV>

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

clear() → void
Removes all entries from the map.
inherited
clear() → void

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

containsKey(Object? key) bool

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

containsKey(Object? key) bool
Whether this map contains the given key.
inherited
containsValue(Object? value) bool
Whether this map contains the given value.
inherited
containsValue(Object? value) bool

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

dispose() → void
Dispose the signal
inherited
forEach(void action(K key, V value)) → void

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

forEach(void action(K key, V value)) → void
Applies action to each key/value pair of the map.
inherited
get() Map<K, V>
Helper method to get the current value
inherited
internalRefresh() bool
inherited
map<K2, V2>(MapEntry<K2, V2> convert(K key, V value)) Map<K2, V2>

Available on ReadonlySignal<Map<K, V>>, provided by the ReadonlyMapSignalExtension 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 convert function.
inherited
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
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<K, V>>, provided by the MapSignalExtension extension

readonly() ReadonlySignal<Map<K, V>>
Returns a readonly signal
inherited
remove(Object? key) → V?
Removes key and its associated value, if present, from the map.
inherited
remove(Object? key) → V?

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

removeWhere(bool test(K key, V value)) → void
Removes all entries of this map that satisfy the given test.
inherited
removeWhere(bool test(K key, V value)) → void

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

set(Map<K, V> val, {bool force = false}) bool
Set the current value by a method
inherited
subscribe(void fn(Map<K, V> value)) → void Function()
Subscribe to value changes with a dispose function
inherited
subscribeToNode(Node node) → void
inherited
toJson() → dynamic
Convert value to JSON
inherited
toMap() Map<K, V>
Snapshot of MapEntries
inherited
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
unsubscribeFromNode(Node node) → void
inherited
update(K key, V update(V value), {V ifAbsent()?}) → V

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

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
Updates all values.
inherited
updateAll(V update(K key, V value)) → void

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

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, or null if key is not in the map.
inherited
operator [](Object? key) → V?

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

operator []=(K key, V value) → void
Associates the key with the given value.
inherited
operator []=(K key, V value) → void

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

operator |(Signal<Map<K, V>> other) MapSignal<K, V>
Pipe: create a new signal by sending value from source to other