waitResults method
Waits the tasks executions and returns a List of results.
onlySubmitted
if true will wait only forsubmitted
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()));
}