progress_bar 0.2.0

  • README.md
  • CHANGELOG.md
  • Installing
  • Versions
  • 8

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.

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_bar.dart';
  
Version Uploaded Documentation Archive
0.2.0 Apr 16, 2018 Go to the documentation of progress_bar 0.2.0 Download progress_bar 0.2.0 archive
0.1.1 Dec 22, 2014 Go to the documentation of progress_bar 0.1.1 Download progress_bar 0.1.1 archive
0.1.0 Dec 20, 2014 Go to the documentation of progress_bar 0.1.0 Download progress_bar 0.1.0 archive
Popularity:
Describes how popular the package is relative to other packages. [more]
16
Health:
Code health derived from static analysis. [more]
--
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
--
Overall:
Weighted score of the above. [more]
8
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 https://www.dartlang.org/dart-2#migration.

Maintenance issues and suggestions

Running dartdoc failed. (-10 points)

Make sure dartdoc runs without any issues.

Dependencies

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