waitResults method

Future<List<R>> waitResults({
  1. bool onlySubmitted = false,
})

Waits the tasks executions and returns a List of results.

  • onlySubmitted if true will wait only for submitted tasks.

Implementation

Future<List<R>> waitResults({bool onlySubmitted = false}) {
  var tasks = (onlySubmitted ? where((t) => t.wasSubmitted) : this);
  return Future.wait(tasks.map((t) => t.waitResult()));
}