progressBar method
void
progressBar(})
Writes a progress bar line: │ ████████░░░░ 75%
Implementation
void progressBar(
double ratio, {
int width = 20,
String filledChar = '█',
String emptyChar = '░',
bool showPercent = true,
}) {
final clamped = ratio.clamp(0.0, 1.0);
final filled = (clamped * width).round();
final bar =
'${theme.accent}${filledChar * filled}${theme.reset}${theme.dim}${emptyChar * (width - filled)}${theme.reset}';
if (showPercent) {
final pct = (clamped * 100).round();
gutterLine('$bar ${theme.dim}$pct%${theme.reset}');
} else {
gutterLine(bar);
}
}