renderActiveBar method
Called each time the ActivityBar
should refresh its display.
Implementation
@override
ConsoleText renderActiveBar(int tick, int width) {
final period = width - 1;
final offset = tick % period;
final reverse = tick % (period * 2) >= period;
final decreasing = width - offset - 1;
final (letf, right) = reverse ? (decreasing, offset) : (offset, decreasing);
return ['[', ' ' * letf, '•', ' ' * right, ']']
.join()
.consoleText(style: ConsoleStyle.info);
}