wait method

FutureOr<Iterable<T>> wait({
  1. _TOnErrorCallback? onError,
  2. bool eagerError = true,
})

Executes all queued operations and returns their results.

This triggers the invocation of all pending functions. It returns a FutureOr<Iterable<T>> that completes with the results.

  • onError: A specific error handler for this call, which runs in addition to the waiter's default error handler.
  • eagerError: If true (the default), fails as soon as one operation fails, similar to Future.wait.

Implementation

FutureOr<Iterable<T>> wait({
  _TOnErrorCallback? onError,
  bool eagerError = true,
}) {
  return waitAlikeF(
    _operations,
    onError: (Object e, StackTrace? s) {
      _onError?.call(e, s);
      onError?.call(e, s);
    },
    eagerError: eagerError,
  );
}