ActiveMap<K, V> class
An ActiveMap with similar characteristics as a an ordinary dart List object. When an update is done an ActiveStateChanged event is triggered which in-turn makes a UI rebuild of that widget.
Has similar characteristics as int and The value cannot be null
- Inheritance
-
- Object
- ActiveType<
Map< K, V> > - ActiveMap
Constructors
-
ActiveMap.new(Map<
K, V> value, {String? typeName}) - ActiveMap.empty({String? typeName})
-
Factory constructor for initializing an ActiveMap to an empty Map.
factory
Properties
- activeController → ActiveController
-
Returns the instance of the ActiveController this
property is associated with.
no setterinherited
-
entries
→ Iterable<
MapEntry< K, V> > -
The map entries in the map
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- isEmpty → bool
-
Whether there is no key/value pair in the map.
no setter
- isNotEmpty → bool
-
Whether there is at least one key/value pair in the map.
no setter
- isNotNull → bool
-
Returns true if the value of
this
is not null.no setterinherited - isNull → bool
-
Returns true if the value of
this
is null.no setterinherited -
keys
→ Iterable<
K> -
The keys of the map.
no setter
- length → int
-
The number of key/value pairs in the map.
no setter
-
mockValue
→ Map<
K, V> -
no setterinherited
-
originalValue
→ Map<
K, V> -
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- typeName ↔ String?
-
getter/setter pairinherited
-
value
→ Map<
K, V> -
no setterinherited
-
values
→ Iterable<
V> -
The values of the map.
no setter
Methods
-
add(
K key, V value, {bool notifyActivities = true}) → void -
If the
key
is already in this map, the corresponding value is overwritten. -
addAll(
Map< K, V> other, {bool notifyActivities = true}) → void -
Adds all key/value pairs of
other
to this map. -
addEntries(
Iterable< MapEntry< entries, {bool notifyActivities = true}) → voidK, V> > -
Adds all key/value pairs of
entries
to this map. -
addEntry(
MapEntry< K, V> entry, {bool notifyActivities = true}) → void - Adds the key/value pair to this map.
-
call(
Map< K, V> value, {bool notifyChange = true, bool setAsOriginal = false}) → void -
Updates the underlying
value
for this ActiveType.inherited -
clear(
{bool notifyActivities = true}) → void - Removes all entries from the map.
-
containsKey(
K key) → bool -
Whether this map contains the given
key
. -
containsValue(
V value) → bool -
Whether this map contains the given
value
. -
equals(
dynamic other) → bool -
Checks if
other
is equal to the value of this ActiveTypeinherited -
forEach(
void action(dynamic, dynamic)) → void -
Applies
action
to each key/value pair of the map. -
map<
K2, V2> (MapEntry< K2, V2> convert(dynamic, dynamic)) → Map<K2, V2> -
Returns a new map where all entries of this map are transformed by
the given
convert
function. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
remove(
K key, {bool notifyActivities = true}) → V? -
Removes
key
and its associated value, if present, from the map. -
removeWhere(
bool test(K key, V value), {bool notifyActivities = true}) → void -
Removes all entries of this map that satisfy the given
test
. -
reset(
{bool notifyChange = true}) → void -
Resets the value to the originalValue.
inherited
-
set(
Map< K, V> value, {bool notifyChange = true, bool setAsOriginal = false}) → Map<K, V> -
Updates the property value. Notifies any listeners to the change
inherited
-
setActiveController(
ActiveController activeController) → void -
Links this ActiveType instance with an ActiveController.
inherited
-
setOriginalValueToCurrent(
) → void -
Updates the original value to what the current value of this property is.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
-
update(
K key, V update(V value), {V ifAbsent()?, bool notifyActivities = true}) → V -
Updates the value for the provided
key
. -
updateAll(
V update(K key, V value), {bool notifyActivities = true}) → void - Updates all values.
Operators
-
operator ==(
dynamic other) → bool -
The equality operator.
inherited
-
operator [](
K key) → V?