feat: add file logs and logging view

This commit is contained in:
Anton Stubenbord
2023-10-11 19:09:26 +02:00
parent a102389cd8
commit f0c3ced804
19 changed files with 681 additions and 231 deletions

View File

@@ -7,7 +7,7 @@ String formatMaxCount(int? count, [int maxCount = 99]) {
return (count ?? 0).toString();
}
String formatBytes(int bytes, int decimals) {
String formatBytes(int bytes, [int decimals = 2]) {
if (bytes <= 0) return "0 B";
const suffixes = ["B", "KB", "MB", "GB", "TB", "PB", "EB", "ZB", "YB"];
var i = (log(bytes) / log(1024)).floor();