ProgressBar constructor
ProgressBar(
- String prompt, {
- int width = 36,
- PromptTheme theme = PromptTheme.dark,
Creates a progress bar.
The prompt is the label displayed above the progress bar.
The optional width lets you dial in the bar footprint to match the
caller's terminal columns while keeping the shimmer effect intact.
The theme controls the colors used for the progress bar and text.
Direct construction captures the ambient terminal and automatically
detected execution mode at construction time. Use
Terminice.progressBar to capture a client's terminal and explicit
fallback policy at creation time.
Implementation
ProgressBar(
this.prompt, {
this.width = 36,
this.theme = PromptTheme.dark,
}) : _taskClient = null,
assert(width > 4) {
initializeAutomatically();
}