Task constructor

const Task(
  1. String title,
  2. FutureOr<void> run(
    1. TaskContext task
    ), {
  3. bool enabled()?,
})

run does the work; TaskContext lets it log, retitle itself, skip and run nested steps. When enabled returns false, the task is skipped instead of run.

Implementation

const Task(this.title, this.run, {this.enabled});