console_bars 1.0.4 icon indicating copy to clipboard operation
console_bars: ^1.0.4 copied to clipboard

A package for creating a customizable progress bar in console easily.

Pub Version (including pre-releases) GitHub last commit GitHub language count GitHub top language

A package for creating an awesome progress bar in console.

Usage #

Options:

  • total : Total number of steps
  • desc: Simple text shown before the bar (optional)
  • space : Character denoting empty space (default : '.')
  • fill: Character denoting filled space (default : '█')
  • time: Toggle timing mode (default : false)
  • percentage : Toggle percentage display (default : false)
  • scale : Scale of the bar relative to width (between: 0 and 1, default: 0.5, Irrelavant if width is specified)
  • width : Width of the bar (If not specified, it will be automatically calculated using the terminal width and scale)

Code:

final p = FillingBar(desc: "Loading", total: 1000, time: true, percentage:true);
  for (var i = 0; i < 1000; i++) {
    p.increment();
    sleep(Duration(milliseconds: 10));
  }

Result:

Animation

Loading : ████████████████████████████████████████.................... 673/1000 67.3% [ 0:00:13.28 / 0:00:06.45 ]
2
likes
120
pub points
26%
popularity

Publisher

unverified uploader

A package for creating a customizable progress bar in console easily.

Repository (GitHub)
View/report issues

Documentation

API reference

License

GPL-3.0 (LICENSE)

More

Packages that depend on console_bars