completeFutures method

Future<bool> completeFutures()

Implementation

Future<bool> completeFutures() => Future.wait(
      state.allParams.entries.where(isAsyncParam).map(
        (param) async {
          final doc = await asyncParams[param.key]!(param.value)
              .onError((_, __) => null);
          if (doc != null) {
            futureParamValues[param.key] = doc;
            return true;
          }
          return false;
        },
      ),
    ).onError((_, __) => [false]).then((v) => v.every((e) => e));