combine5<A, B, C, D, E, R> static method

CombineLatestNotifier<dynamic, R> combine5<A, B, C, D, E, R>(
  1. ResultListenable<A> notifierA,
  2. ResultListenable<B> notifierB,
  3. ResultListenable<C> notifierC,
  4. ResultListenable<D> notifierD,
  5. ResultListenable<E> notifierE, {
  6. required R combineData(
    1. A a,
    2. B b,
    3. C c,
    4. D d,
    5. E e,
    ),
  7. R? data,
  8. Result<R>? result,
  9. Duration? expiration,
  10. ResultNotifierCallback<R>? onReset,
  11. R onErrorReturn(
    1. Object? error
    )?,
  12. bool autoReset = false,
  13. bool refreshOnError = false,
  14. bool ignoreLoading = false,
})

Constructs a CombineLatestNotifier that combines the data from the specified notifiers using the specified combineData function.

Implementation

static CombineLatestNotifier<dynamic, R> combine5<A, B, C, D, E, R>(
  ResultListenable<A> notifierA,
  ResultListenable<B> notifierB,
  ResultListenable<C> notifierC,
  ResultListenable<D> notifierD,
  ResultListenable<E> notifierE, {
  required R Function(A a, B b, C c, D d, E e) combineData,
  R? data,
  Result<R>? result,
  Duration? expiration,
  ResultNotifierCallback<R>? onReset,
  R Function(Object? error)? onErrorReturn,
  bool autoReset = false,
  bool refreshOnError = false,
  bool ignoreLoading = false,
}) {
  return CombineLatestNotifier<dynamic, R>(
    [notifierA, notifierB, notifierC, notifierD, notifierE],
    combineData: (data) => combineData(data[0] as A, data[1] as B, data[2] as C, data[3] as D, data[4] as E),
    data: data,
    result: result,
    expiration: expiration,
    onReset: onReset,
    onErrorReturn: onErrorReturn,
    autoReset: autoReset,
    refreshOnError: refreshOnError,
    ignoreLoading: ignoreLoading,
  );
}