This repository was archived by the owner on Jul 16, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +4
-10
lines changed Expand file tree Collapse file tree 1 file changed +4
-10
lines changed Original file line number Diff line number Diff line change @@ -63,7 +63,7 @@ class Progress {
6363
6464 void complete ([String ? update]) {
6565 _stopwatch.stop ();
66- _writeLn ('$_clearLn ${okPen ('✓ ' )} ${update ?? _message } $_time \n ' );
66+ _writeLn ('$_clearLn ${okPen ('✔ ' )} ${update ?? _message } $_time \n ' );
6767 _timer? .cancel ();
6868 }
6969
@@ -76,8 +76,7 @@ class Progress {
7676 void _onTick (Timer ? _, [bool withTime = true ]) {
7777 _index++ ;
7878 final char = _progressAnimation[_index % _progressAnimation.length];
79- _write ('$_clearMessageLength $char $_message ... ${withTime ? _time : '' }'
80- .trim ());
79+ _write ('$_clearLn $char $_message ... ${withTime ? _time : '' }' .trim ());
8180 }
8281
8382 void _write (Object ? object) {
@@ -92,13 +91,8 @@ class Progress {
9291 }
9392 }
9493
95- String get _clearMessageLength {
96- final length = _message! .length + 8 + _time.length;
97-
98- return '\b ${'\b ' * length }' ;
99- }
100-
101- String get _clearLn => '$_clearMessageLength \u 001b[2K' ;
94+ String get _clearLn => '\u 001b[2K'
95+ '\r ' ;
10296
10397 String get _time {
10498 final elapsedTime = _stopwatch.elapsed.inMilliseconds;
You can’t perform that action at this time.
0 commit comments