tick method
void
tick()
Progress the bar by one tick towards its maxValue.
Implementation
void tick() {
if (!_shouldDrawProgress) {
return;
}
_tickCount++;
final fractionComplete = math.max(
0,
_tickCount * _innerWidth ~/ maxValue - 1,
);
final remaining = _innerWidth - fractionComplete - 1;
final spinner = showSpinner
? tickCharacters[_tickCount % tickCharacters.length]
: ' ';
_printProgressBar(
'[${tickCharacters[0] * fractionComplete}$spinner${' ' * remaining}]',
);
}