consec2<A, B, R> function
Maps two synchronous or asynchronous values to a single value.
Implementation
@pragma('vm:prefer-inline')
FutureOr<R> consec2<A, B, R>(
FutureOr<A> a,
FutureOr<B> b,
FutureOr<R> Function(A a, B b) callback, {
_TOnErrorCallback? onError,
bool eagerError = true,
_TOnCompleteCallback? onComplete,
}) {
return wait<R>(
[a, b],
(items) => callback(items.elementAt(0) as A, items.elementAt(1) as B),
onError: onError,
eagerError: eagerError,
onComplete: onComplete,
);
}