update ios project

update ios project
This commit is contained in:
Zeus
2024-07-24 11:51:39 +08:00
parent 876d355b18
commit 1bf69048f3
275 changed files with 3372 additions and 1015 deletions
+27
View File
@@ -0,0 +1,27 @@
class TransferUtil {
double _transfer = 0;
int _level = 0;
List suffix = [
'B',
'KB',
'MB',
'GB',
'TB',
'PB'
];
String toHumanReadable(int transfer) {
_transfer = transfer.toDouble();
handleTransfer();
return '${_transfer.toStringAsFixed(2)} ${suffix[_level]}';
}
handleTransfer() {
if (_transfer > 1024) {
_transfer = _transfer / 1024;
++_level;
handleTransfer();
}
}
}