progress_bar 0.2.0

  • Readme
  • Changelog
  • Installing
  • 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) {
  if (bar.complete) {


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.

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:

  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_bar.dart';
Describes how popular the package is relative to other packages. [more]
Code health derived from static analysis. [more]
Reflects how tidy and up-to-date the package is. [more]
Weighted score of the above. [more]
Learn more about scoring.

The package version is not analyzed, because it does not support Dart 2. Until this is resolved, the package will receive a health and maintenance score of 0.

Analysis issues and suggestions

Support Dart 2 in pubspec.yaml.

The SDK constraint in pubspec.yaml doesn't allow the Dart 2.0.0 release. For information about upgrading it to be Dart 2 compatible, please see


Package Constraint Resolved Available
Direct dependencies
Dart SDK >=1.20.1 <2.0.0