tasks method

Future<void> tasks(
  1. List<Task> tasks, {
  2. int concurrency = 1,
  3. bool exitOnError = true,
})

Runs tasks as a live list: a spinner line per task, the last line of each running task's output under it, and logs above it. Nested steps come from TaskContext.tasks. At the end it prints one summary line.

concurrency tasks run at once; they always show in the order given. With exitOnError, a failure starts no new tasks (they are marked skipped), waits for the running ones, and then throws TasksFailed with every failure. Without it, every task runs and failures are only reported.

In plain mode (pipes, CI) it writes one line per finished task, and each logged line prefixed with its task's title. Above Level.info it writes only failures and the summary, to stderr. At Level.verbose every logged line is also printed above the list.

Like progress, it never reads stdin, enters raw mode, hides the cursor or catches signals.

Implementation

Future<void> tasks(
  List<Task> tasks, {
  int concurrency = 1,
  bool exitOnError = true,
}) =>
    _TaskRun(this, exitOnError).run(tasks, concurrency);