comms
library
Mixins
Listener <Message >
A mixin used on classes that want to receive messages of type Message
.
MultiListener
A mixin used on classes that want to receive messages of multiple types.
Sender <Message >
A mixin used on classes that want to send messages of type Message
, by
providing send function.
StateSender <State >
Sends emitted State
s to all Listener s of type State
.
Functions
getSend <Message > ()
→ SenderFunctor <Message >
Returns an object that can be called like a function (a functor) which sends
messages to all Listener s of type Message
, without the need of
instatiating a class with Sender mixin.
Typedefs
LoggerCallback
= void Function(String message )
OnMessage <Message >
= void Function(Message message )
Signature for callbacks that are run when a message is received.