onMessage method
Overridable message hook
Receives all events for specialized message handling before dispatching to the channel callbacks. Must return the payload, modified or unmodified.
Implementation
@internal
dynamic onMessage(String event, dynamic payload, [String? ref]) {
return payload;
}