subscribeLazyPayloadHandler method
Future<Subscribed>
subscribeLazyPayloadHandler(
- String topic,
- void onEvent(
- LazyEventPayload event
- SubscribeOptions? options,
This subscribes the session to a topic and routes lazy payload views
directly to onEvent so encoded payload bytes can be forwarded without
forcing immediate decode.
Implementation
Future<Subscribed> subscribeLazyPayloadHandler(
String topic,
void Function(LazyEventPayload event) onEvent, {
SubscribeOptions? options,
}) {
return _subscribe(
topic,
options: options,
configure: (subscribed) => subscribed.onLazyEventPayload(onEvent),
);
}