resolveBoth<R> method
Resolves this
Future and other
with resolver
.
Implementation
Future<R> resolveBoth<R>(
FutureOr<T> other, FutureOr<R> Function(T val1, T val2) resolver) {
if (other is Future<T>) {
return then((v1) {
return other.then((v2) => resolver(v1, v2));
});
} else {
return then((v1) {
return resolver(v1, other);
});
}
}