complete method

void complete([
  1. String? update
])

End the progress and mark it as a successful completion.

See also:

  • fail, to end the progress and mark it as failed.
  • cancel, to cancel the progress entirely and remove the written line.

Implementation

void complete([String? update]) {
  _stopwatch.stop();
  _write(
    '''$_clearLine${lightGreen.wrap('✓')} ${update ?? _message} $_time\n''',
  );
  _timer?.cancel();
}