zip8<R, A, B, C, D, E, F, G, H> function

EventSubscriptionBuilder<R> zip8<R, A, B, C, D, E, F, G, H>(
  1. EventSubscriptionBuilder<A> eventA,
  2. EventSubscriptionBuilder<B> eventB,
  3. EventSubscriptionBuilder<C> eventC,
  4. EventSubscriptionBuilder<D> eventD,
  5. EventSubscriptionBuilder<E> eventE,
  6. EventSubscriptionBuilder<F> eventF,
  7. EventSubscriptionBuilder<G> eventG,
  8. EventSubscriptionBuilder<H> eventH,
  9. R zipper(
    1. A a,
    2. B b,
    3. C c,
    4. D d,
    5. E e,
    6. F f,
    7. G g,
    8. H h,
    ),
)

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> zip8<R, A, B, C, D, E, F, G, H>(
  EventSubscriptionBuilder<A> eventA,
  EventSubscriptionBuilder<B> eventB,
  EventSubscriptionBuilder<C> eventC,
  EventSubscriptionBuilder<D> eventD,
  EventSubscriptionBuilder<E> eventE,
  EventSubscriptionBuilder<F> eventF,
  EventSubscriptionBuilder<G> eventG,
  EventSubscriptionBuilder<H> eventH,
  R Function(A a, B b, C c, D d, E e, F f, G g, H h) zipper,
) {
  return zip(
    [eventA, eventB, eventC, eventD, eventE, eventF, eventG, eventH],
    (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;
      final e = values[4] as E;
      final f = values[5] as F;
      final g = values[6] as G;
      final h = values[7] as H;

      return zipper(a, b, c, d, e, f, g, h);
    },
  );
}