watcher<A, S> function
Watcher<A, S>
watcher<A, S>(
- Worker<
A, S> worker, - Stream<
A> select(- Stream actionStream,
- WorkerContext<
S> context
Implementation
Watcher<A, S> watcher<A, S>(
Worker<A, S> worker,
Stream<A> Function(Stream<dynamic> actionStream, WorkerContext<S> context) select
) => Watcher<A, S>(
watch: (Stream<dynamic> actionStream, WorkerContext<S> context) async {
await applyWorker<A, S>(
select(actionStream, context),
context,
worker
);
}
);