KeyValueListenable<K, V> class
abstract
An interface for a KeyValueNotifer that exposes a value.
This is not a subtype of ValueListenable or AdvancedValueListenable, because the Listenable.addListener, Listenable.removeListener, AdvancedValueListenable.addValueListener and AdvancedValueListenable.removeValueListener methods require a different signature in a KeyValueListenable.
- Implementers
Constructors
- KeyValueListenable()
-
const
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- hasListeners → bool
-
no setter
- isEmpty → bool?
-
If the internal NotifierBase is an EmptyValueNotifier, you can check
if it is empty.
no setter
- isNotEmpty → bool?
-
If the internal NotifierBase is an EmptyValueNotifier, you can check
if it is not empty.
no setter
-
keys
→ Iterable<
K> -
no setter
- notifierType → Type
-
Get the Type of the underlying NotifierBase.
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- value → V
-
The current value of the object. When the value changes, the
callbacks registered with addListener and addValueListener
will be invoked.
no setter
Methods
-
addListener(
K key, VoidCallback listener) → bool -
Returns
true
ifkey
was not already used for another listener. -
addValueListener(
K key, ValueCallback< V> listener) → bool -
Returns
true
ifkey
was not already used for another listener. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
removeListener(
K key) → bool -
Returns
true
ifkey
was used for a listener and therefore successfully removed. -
removeValueListener(
K key) → bool -
Returns
true
ifkey
was used for a listener and therefore successfully removed. -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited