zip4<R, A, B, C, D> function
EventSubscriptionBuilder<R>
zip4<R, A, B, C, D>(
- EventSubscriptionBuilder<
A> eventA, - EventSubscriptionBuilder<
B> eventB, - EventSubscriptionBuilder<
C> eventC, - EventSubscriptionBuilder<
D> eventD, - R zipper(
- A a,
- B b,
- C c,
- D d,
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> zip4<R, A, B, C, D>(
EventSubscriptionBuilder<A> eventA,
EventSubscriptionBuilder<B> eventB,
EventSubscriptionBuilder<C> eventC,
EventSubscriptionBuilder<D> eventD,
R Function(A a, B b, C c, D d) zipper,
) {
return zip(
[eventA, eventB, eventC, eventD],
(values) {
final a = values[0] as A;
final b = values[1] as B;
final c = values[2] as C;
final d = values[3] as D;
return zipper(a, b, c, d);
},
);
}