progress_bar 1.0.0 copy "progress_bar: ^1.0.0" to clipboard
progress_bar: ^1.0.0 copied to clipboard

Progress bar for dart command-line apps. A port of node-progress to Dart.

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();
  }
});

basic

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.

4
likes
130
pub points
65%
popularity

Publisher

unverified uploader

Progress bar for dart command-line apps. A port of node-progress to Dart.

Repository (GitHub)
View/report issues

Documentation

API reference

License

BSD-3-Clause (license)

More

Packages that depend on progress_bar