publish method
Publishes an event to the server.
Implementation
@override
Future publish(String eventName, value) {
var c = Completer<Map>();
var requestId = _uuid.v4();
_requests[requestId] = c;
_peer!.sendNotification('publish', {
'request_id': requestId,
'client_id': clientId,
'event_name': eventName,
'value': value
});
return c.future.then((data) {
_clientId = data['result']['client_id'] as String?;
});
}