encode method Null safety

Object encode()

Encode a message to a JSON-encodable list of values.

Implementation

Object encode() {
  final parts = [
    joinRef,
    ref,
    topic,
    event.value,
    payload,
  ];
  _logger.finest('Message encoded to $parts');
  return parts;
}