tick method

dynamic tick(
  1. {int len = 1,
  2. Map<String, String>? tokens}
)

"tick" the progress bar with optional len and optional tokens.

Implementation

tick({int len: 1, Map<String, String>? tokens}) {
  if (this.curr == 0) {
    this.start = new DateTime.now();
  }

  this.curr += len;
  this.render(tokens);

  // progress complete
  if (this.curr >= this.total) {
    this.complete = true;
    this.terminate();
    if (this.callback != null && this.callback is Function) {
      // Function.apply(this.callback, [this.complete]);
    }
  }
}