a package for creating an awesome progress bar in console.
usage
options:
total
: total number of stepsdesc
: 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
: width of the bar (between: 0 and 1, default: 0.5)
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:
loading : ████████████████████████████████████████.................... 673/1000 67.3% [ 0:00:13.28 / 0:00:06.45 ]
Comments are closed.