opt.: disk size (#252)

This commit is contained in:
lollipopkit
2024-01-21 18:01:11 +08:00
parent 362dcdf288
commit 50d6ed919b
11 changed files with 42 additions and 32 deletions

View File

@@ -182,7 +182,7 @@ class _LocalStoragePageState extends State<LocalStoragePage> {
title: Text(fileName),
subtitle: isDir
? null
: Text(stat.size.convertBytes, style: UIs.textGrey),
: Text(stat.size.bytes2Str, style: UIs.textGrey),
trailing: Text(
stat.modified
.toString()

View File

@@ -304,7 +304,7 @@ class _SftpPageState extends State<SftpPage> with AfterLayoutMixin {
subtitle: isDir
? null
: Text(
(file.attr.size ?? 0).convertBytes,
(file.attr.size ?? 0).bytes2Str,
style: UIs.textGrey,
),
onTap: () {

View File

@@ -94,7 +94,7 @@ class _SftpMissionPageState extends State<SftpMissionPage> {
);
case SftpWorkerStatus.loading:
final percentStr = (status.progress ?? 0.0).toStringAsFixed(2);
final size = (status.size ?? 0).convertBytes;
final size = (status.size ?? 0).bytes2Str;
return _wrapInCard(
status: status,
subtitle: l10n.percentOfSize(percentStr, size),