sendMessageOnChannel method
Implementation
void sendMessageOnChannel(
String message, WebSocketChannel webSocketChannel, Channel channel) {
Map msg = {
"msg": "method",
"method": "sendMessage",
"id": "42",
"params": [
{"rid": channel.id, "msg": message}
]
};
webSocketChannel.sink.add(jsonEncode(msg));
}