renderActiveBar method

  1. @override
ConsoleText renderActiveBar(
  1. int tick,
  2. int width
)
override

Called each time the ActivityBar should refresh its display.

Implementation

@override
ConsoleText renderActiveBar(int tick, int width) {
  final left = (width * progress).floor();
  final right = width - left;

  return ['[', '=' * left, ' ' * right, ']']
      .join()
      .consoleText(style: ConsoleStyle.info);
}