listen<HubEventPayload, E extends HubEvent<HubEventPayload> > abstract method
StreamSubscription<E>
listen<HubEventPayload, E extends HubEvent<HubEventPayload> >(
- HubChannel<
HubEventPayload, E> channel, - HubEventListener<
E> listener, { - Function? onError,
Listens to the Hub channel
for events produced from all plugins in the
channel's categories.
Optionally, onError
may be specified which will be passed to
Stream.listen. It must be of type void Function(Object error)
or
void Function(Object error, StackTrace)
.
Implementation
StreamSubscription<E>
listen<HubEventPayload, E extends HubEvent<HubEventPayload>>(
HubChannel<HubEventPayload, E> channel,
HubEventListener<E> listener, {
Function? onError,
});