0 purchases
progress bar
progress_bar #
Progress bar for dart command-line apps. A port of node-progress to Dart.
Usage #
Basic usage:
var bar = new ProgressBar(' [:bar] :percent :etas ', total: 10);
var timer = new Timer.periodic(new Duration(seconds: 1), (Timer timer) {
bar.tick();
if (bar.complete) {
timer.cancel();
}
});
copied to clipboard
Options #
These are keys in the options you can pass to the progress bar along with
total as seen in the example above.
total total number of ticks to complete
width the displayed width of the progress bar defaulting to total
complete completion character defaulting to "="
incomplete incomplete character defaulting to "-"
clear option to clear the bar on completion defaulting to false
callback optional function to call when the progress bar completes
Tokens #
These are tokens you can use in the format of your progress bar.
:bar the progress bar itself
:current current tick number
:total total ticks
:elapsed time elapsed in seconds
:percent completion percentage
:eta estimated completion time in seconds
Features and bugs #
Please file feature requests and bugs at the issue tracker.
For personal and professional use. You cannot resell or redistribute these repositories in their original state.
There are no reviews.