ResolvedHook constructor
ResolvedHook({
- required List<
String> filePaths, - required List<
ResolvedHookTask> tasks,
Implementation
ResolvedHook({
required this.filePaths,
required this.tasks,
}) {
Iterable<ResolvedHookTask> subTasks(ResolvedHookTask task) sync* {
for (final subTask in task.subTasks) {
yield subTask;
yield* subTasks(subTask);
}
}
final allTasks = [
for (final task in tasks) ...[
task,
...subTasks(task),
],
];
tasksById = {
for (final task in allTasks) task.original.id: task,
};
}