combine5<A, B, C, D, E, R> static method
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 combineData(
- A a,
- B b,
- C c,
- D d,
- E e,
- R? data,
- Result<
R> ? result, - Duration? expiration,
- ResultNotifierCallback<
R> ? onReset, - R onErrorReturn(
- Object? error
- bool autoReset = false,
- bool refreshOnError = false,
- 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,
);
}