v1.0.6
file_sizes
获取文件的可读大小。它完全用 Dart 编写,并支持数字和字符串作为参数。
27喜欢 4820近 30 天下载160Pub 分数
AndroidiOSWebmacOSWindowsLinux
获取文件的可读大小。
以下为英文项目原文快照,最新内容请访问 GitHub。
Get the Human readable size of the file. It is purely written in dart and support both number and string as parameters.
getSize(string or number, {PrecisionValue}): returns String
FileSize.getSize(1000) '1.00 KB'
FileSize.getSize(1048576) '1.04 MB'
FileSize.getSize(1073741824) '1.00 GB'
FileSize.getSize(1099511627776) '1.00 TB'
FileSize.getSize(664365320, PrecisionValue.THREE) "633.588 MB"
FileSize.getSize(4324324232343, PrecisionValue.FOUR) "3.9321 TB"
FileSize.getSize(664365320, PrecisionValue.NONE) "633 MB"
FileSize.getSize(4324324232343, PrecisionValue.NONE) "3 TB"
getKiloBytes(string or number, {PrecisionValue}): returns String
FileSize.getKiloBytes(54613) '54.61 KB'
依赖清单 1 项
{"sdk":"flutter"}先按使用场景筛选,再比较项目活跃情况,最后到原始仓库核对使用要求。
“A repository is the most basic element of GitHub.”
GitHub Docs — About repositories ↗