Skip to content
This repository was archived by the owner on May 17, 2023. It is now read-only.
/ progress_bar Public archive

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

License

Notifications You must be signed in to change notification settings

jarontai/progress_bar

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

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

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages