From 2b07c97c08f6f902b79b86dd46440b115f1efcae Mon Sep 17 00:00:00 2001 From: csf Date: Mon, 1 Aug 2022 12:17:38 +0800 Subject: [PATCH] fix mobile readableFileSize --- flutter/lib/common.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/flutter/lib/common.dart b/flutter/lib/common.dart index ddce41a22..dbd15d436 100644 --- a/flutter/lib/common.dart +++ b/flutter/lib/common.dart @@ -199,7 +199,7 @@ const G = M * K; String readableFileSize(double size) { if (size < K) { - return size.toString() + " B"; + return size.toStringAsFixed(2) + " B"; } else if (size < M) { return (size / K).toStringAsFixed(2) + " KB"; } else if (size < G) {