subscribeToChannel method
Implementation
TivioDataStream<TivioDataChannel>? subscribeToChannel({required String channelId}) {
var controller = TivioDataStreamController<TivioDataChannel>();
var callFunctionWithArguments = () => callFunction('subscribeToChannel', [channelId], (payload) => null, errorPayload: CallFunctionErrorPayload(messageId: 'subscribe-to-channel:$channelId', type: 'callback'));
_callbackMessageBroker.listen('subscribe-to-channel:$channelId', (payload) {
handleNewEventInStream(payload, controller, callFunctionWithArguments, (payload) => TivioDataChannel.fromJson(payload));
});
callFunctionWithArguments();
return controller.tivioDataStream;
}