streamChannelMessagesUnsubscribe method

void streamChannelMessagesUnsubscribe(
  1. WebSocketChannel webSocketChannel,
  2. Channel channel
)

Implementation

void streamChannelMessagesUnsubscribe(
    WebSocketChannel webSocketChannel, Channel channel) {
  Map msg = {
    "msg": "unsub",
    "id": channel.id! + "subscription-id",
  };
  webSocketChannel.sink.add(jsonEncode(msg));
}