LocalMessenger<M, A> class
A simple implementation of Messenger that runs in the local Isolate.
The message is handled by the Handler (provided in the constructor) asynchronously in the event queue.
- Mixed in types
-
- Messenger<
M, A>
- Messenger<
Constructors
-
LocalMessenger(Handler<
M, A> _handler) - Creates a LocalMessenger that handles messages with the given Handler.
-
LocalMessenger.of(HandlerFunction<
M, A> handler) - Creates a LocalMessenger based on a handler function.
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
-
close(
) → void -
Close this Messenger.
override
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
send(
M message) → Future< A> -
Send a message and get a Future to receive the answer at some later
point in time, asynchronously.
override
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited