onMessage method
Called when a message is received from the server.
The plugin can then react to the message, for example by sending a response to the server.
Implementation
@override
void onMessage(Message message) {
if (message is! AwarenessMessage) {
return;
}
switch (message.type) {
case AwarenessMessageType.awarenessState:
_handleAwarenessState(message as AwarenessStateMessage);
return;
case AwarenessMessageType.awarenessUpdate:
_handleAwarenessUpdate(message as AwarenessUpdateMessage);
return;
case AwarenessMessageType.awarenessQuery:
return;
}
}