v1.0.6
file_sizes
파일의 인간이 읽기 쉬운 크기를 얻습니다. 순수하게 다트로 작성되었으며 숫자와 문자열 둘 다 매개변수로 지원합니다.
27좋아요 2.4천30일 다운로드160Pub 점수
AndroidiOSWebmacOSWindowsLinux
파일의 인간이 읽을 수 있는 크기를 가져옵니다.
{"sdk":"flutter"}아래는 영문 원문 스냅샷입니다. 최신 내용은 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'