and<R> method

FutureOr<Tuple<T, R>> and<R>(
  1. FutureOr<R> mapper(
    1. T input
    )
)

Implementation

FutureOr<Tuple<T, R>> and<R>(FutureOr<R> mapper(T input)) {
  final other = filterNotNull().thenOr((resolved) {
    return mapper(resolved).thenOr<Tuple<T, R>>((R second) {
      return Tuple<T, R>(resolved, second);
    });
  });
  return other.unbox();
}