foldFuture<TR, T> method
Implementation
Future<TR> foldFuture<TR, T>(
Future<TR> Function() noneF, Future<TR> Function(T val) someF) {
return then((value) => value.fold(() => noneF().then((value) => value),
(val) => someF(val).then((value) => value)));
}