Listener<Message> mixin
A mixin used on classes that want to receive messages of type Message
.
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:
- MultiListener, which enables listening to multiple message types.
- Mixin Applications
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- 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(
Message message) → void -
Called when registering Listener if a message of type
Message
was sent earlier by Sender. -
onMessage(
Message message) → void -
Called every time a new
message
is received. -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited