formatSize static method
Implementation
static String formatSize(int size, {bool lowerCase = true, int fixed = 1}) {
for (final item in _fileSizeMap.keys) {
if (size >= item) {
final result = item > 0 ? (size / item).toStringAsFixed(fixed) : 0;
var unit = _fileSizeMap[item];
if (lowerCase) unit = unit!.toLowerCase();
return '$result$unit';
}
}
return '';
}