subscribeHandler method
Future<Subscribed>
subscribeHandler(
- String topic,
- void onEvent(
- Event event
- SubscribeOptions? options,
This subscribes the session to a topic and routes events directly to
onEvent without requiring the caller to touch Subscribed.eventStream.
Implementation
Future<Subscribed> subscribeHandler(
String topic,
void Function(Event event) onEvent, {
SubscribeOptions? options,
}) {
return _subscribe(
topic,
options: options,
configure: (subscribed) => subscribed.onEvent(onEvent),
);
}