zip2<R, A, B> function
EventSubscriptionBuilder<R>
zip2<R, A, B>(
- EventSubscriptionBuilder<
A> eventA, - EventSubscriptionBuilder<
B> eventB, - R zipper(
- A a,
- B b
Zips the values of each provided event using the zipper
into a single output EventHandler when all handlers have emitted at
each index.
See zip.
Implementation
EventSubscriptionBuilder<R> zip2<R, A, B>(
EventSubscriptionBuilder<A> eventA,
EventSubscriptionBuilder<B> eventB,
R Function(A a, B b) zipper,
) {
return zip(
[eventA, eventB],
(values) {
final a = values[0] as A;
final b = values[1] as B;
return zipper(a, b);
},
);
}