TickedProgress constructor
TickedProgress(})
Starts a progress line reading message.
animate decides whether the sidecar runs. It defaults to
progressCanAnimate, and exists as a parameter for the seam described
there.
Implementation
TickedProgress(
this._message, {
Level level = Level.info,
bool? animate,
Duration tickInterval = const Duration(milliseconds: 80),
}) : _quiet = level.index > Level.info.index,
_animate = animate ?? progressCanAnimate() {
_stopwatch.start();
if (!_animate) {
_paintStatic();
return;
}
// Deliberately not awaited. The sidecar starts ticking on its own; the
// handle is only wanted for shutdown, and awaiting here would make the
// first frame wait on an isolate spawn.
unawaited(_spawn(tickInterval));
}