PendingTask constructor
PendingTask({})
Implementation
PendingTask({
required this.files,
required this.resolvedTask,
required bool Function() isHalted,
required Iterable<int> completedTasks,
required Iterable<int> startedTasks,
}) : _completedTasks = completedTasks,
_startedTasks = startedTasks,
_isHalted = isHalted {
subTasks = resolvedTask.subTasks.map((task) {
final subTask = PendingTask(
files: files,
resolvedTask: task,
isHalted: isHalted,
completedTasks: completedTasks,
startedTasks: startedTasks,
);
return subTask;
}).toList();
Iterable<PendingTask> allTasks(PendingTask task) sync* {
yield task;
for (final subTask in task.subTasks) {
yield* allTasks(subTask);
}
}
taskMap = {
for (final task in allTasks(this)) task.id: task,
};
}