MultiListener mixin
A mixin used on classes that want to receive messages of multiple types.
Subclasses must call listen when they want to start receiving messages and cancel when they want to stop receiving messages.
Subclasses must implement onMessage.
See also:
- Listener, which enables listening to messages of single type.
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
-
listenerDelegates
→ List<
ListenerDelegate> -
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
cancel(
) → void - Stops receiving messages.
-
listen(
) → void - Starts message receiving.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
onInitialMessage(
dynamic message) → void - Called when registering MultiListener if a message of type specified in listenerDelegates was sent earlier by Sender.
-
onMessage(
dynamic message) → void -
Called every time a new
message
of type specified in listenerDelegates is received. -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited