onMessage method

  1. @internal
dynamic onMessage(
  1. String event,
  2. dynamic payload, [
  3. String? ref
])

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;
}