progress_bar 0.2.0
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(); } });
Options #
These are keys in the options you can pass to the progress bar along with
total as seen in the example above.
totaltotal number of ticks to complete
widththe displayed width of the progress bar defaulting to total
Features and bugs #
Please file feature requests and bugs at the issue tracker.
Changelog #
0.2.0 #
- Fix compile error
0.1.1 #
- Make options optional.
- Add the optional callback function, which called when the progress bar completes.
0.1.0 #
- Initial version.
Use this package as a library
1. Depend on it
Add this to your package's pubspec.yaml file:
dependencies: progress_bar: ^0.2.0
2. Install it
You can install packages from the command line:
with pub:
$ pub get
Alternatively, your editor might support
pub get.
Check the docs for your editor to learn more.
3. Import it
Now in your Dart code, you can use:
import 'package:progress_bar/progress.