diff --git a/lib/utils/progress.dart b/lib/utils/progress.dart index 2ae2542..c2a3f2f 100644 --- a/lib/utils/progress.dart +++ b/lib/utils/progress.dart @@ -25,13 +25,11 @@ String formatProgressMessage({ final StringBuffer buffer = .new(prefixText); if (speed case final speed?) { - buffer.writeAll([" ", ?direction, Bytes.bits(speed * 8), "/s"]); + buffer.writeAll([" ", ?direction, Bytes.bits(speed * 8), "/s "]); } - buffer.write(" "); - if (total.isNegativeOrZero) { - buffer.write(Bytes(processed).toString(" ")); + buffer.write(Bytes(processed)); } else { buffer.write(percentFormatter.format(processed / total)); } diff --git a/test/utils/progress_test.dart b/test/utils/progress_test.dart index f646019..861e428 100644 --- a/test/utils/progress_test.dart +++ b/test/utils/progress_test.dart @@ -6,7 +6,7 @@ void main() { test("handles unknown totals", () { expect( formatProgressMessage(processed: 1024, total: -1), - contains("1.0 KB"), + contains("1.0KB"), ); }); });