combine8<T, A, B, C, D, E, F, G, H> static method

FlowState<T> combine8<T, A, B, C, D, E, F, G, H>(
  1. FlowState<A> one,
  2. FlowState<B> two,
  3. FlowState<C> three,
  4. FlowState<D> four,
  5. FlowState<E> five,
  6. FlowState<F> six,
  7. FlowState<G> seven,
  8. FlowState<H> eight, [
  9. T combiner(
    1. A a,
    2. B b,
    3. C c,
    4. D d,
    5. E e,
    6. F f,
    7. G g,
    8. H h,
    )?,
])

Implementation

static FlowState<T> combine8<T, A, B, C, D, E, F, G, H>(
  FlowState<A> one,
  FlowState<B> two,
  FlowState<C> three,
  FlowState<D> four,
  FlowState<E> five,
  FlowState<F> six,
  FlowState<G> seven,
  FlowState<H> eight, [
  T Function(A a, B b, C c, D d, E e, F f, G g, H h)? combiner,
]) {
  combiner ??= (a, b, c, d, e, f, g, h) => [a, b, c, d, e, f, g, h] as T;
  final combinedStream = Rx.combineLatest8<A, B, C, D, E, F, G, H, T>(
    one.stream,
    two.stream,
    three.stream,
    four.stream,
    five.stream,
    six.stream,
    seven.stream,
    eight.stream,
    combiner,
  );
  final initialCombinedValue = combiner(
    one.current,
    two.current,
    three.current,
    four.current,
    five.current,
    six.current,
    seven.current,
    eight.current,
  );
  return FlowState<T>(initialCombinedValue).._subject.addStream(combinedStream);
}