RocketListenable class abstract
An abstract class that defines the behavior of a listenable object.
A listenable object allows other objects to register and unregister listeners, and can notify its listeners when a change occurs.
Constructors
Properties
-
getListenersKeys
→ List<
String> -
Returns a list of all keys that have registered listeners.
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- hasListeners → bool
-
Returns true if this object has any listeners.
no setter
- isMerged → bool
-
Returns true if this object is merged with other objects.
no setter
-
merges
↔ List<
RocketListenable> -
A list of RocketListenable objects that this object is merged with.
getter/setter pair
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
callListener(
String key) → void - Notifies the listeners registered with the specified key.
-
callListeners(
List< String> keys) → void - Notifies the listeners registered with any of the specified keys.
-
dispose(
) → void - Disposes of this object and removes all listeners.
-
keyHasListeners(
String key) → bool - Returns true if a listener is registered with the specified key.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
registerListener(
String key, VoidCallback listener) → void - Registers a new listener with the specified key.
-
registerListeners(
Map< String, List< listeners) → voidVoidCallback> > - Registers multiple listeners with the specified keys.
-
removeListener(
String key, [VoidCallback? listener]) → void - Removes the specified listener (or all listeners if no listener is specified) with the specified key.
-
removeListeners(
List< String> keys, [List<VoidCallback> ? listeners]) → void - Removes the specified listeners (or all listeners if no listener is specified) with the specified keys.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited