progress method
Shows message while an operation goes on, until the progress is
closed (CliProgress.complete, CliProgress.fail,
CliProgress.cancel), CliProgress.run closing it on the outcome of
a body.
What it shows follows what the output can do:
- CliMode.interactive: a spinner, the message and the time so far,
live in the inline session, below the prompts asked meanwhile, with
the lines logged meanwhile above it; the closing line committed in
its place with the time it took,
✓ Built in 3.1 s. - A terminal that does not redraw, or where nobody answers: the
message as it starts, each changed message, the closing line,
✓ Built. - Output that is no terminal: the closing line alone.
await Cli.current
.progress('Building')
.run(build, done: (_) => 'Built');
Implementation
CliProgress progress(String message) => CliProgress(this, message);