FLUTTER ECOSYSTEM

AnmolSethi/file_size

फ़ाइल का मानव पठनीय आकार प्राप्त करें।

फ़ाइल आकार प्रोजेक्ट कवर
Stars
5
Forks
1
अंतिम पुश (UTC)
15 सित॰ 2021
प्रोजेक्ट स्थिति
सक्रिय
Anmol Sethi GitHub avatar
GITHUB User

Anmol Sethi ↗

I build Mobile Apps using #Flutter and #ReactNative, websites using #ReactJs and #NextJS, APIs using #NodeJS.

भाषाएँDart

तकनीकी विषय

इस रिपॉज़िटरी के पैकेज

उपयोग की गई निर्भरताएँ

निर्भरता सूची 1 आइटम
  • flutter_testडेवलपमेंट{"sdk":"flutter"}

मूल README

यह अंग्रेज़ी मूल स्नैपशॉट है। नवीनतम सामग्री GitHub पर देखें।

README खोलें / बंद करें

FileSize

pub package Dart

Get the Human readable size of the file. It is purely written in dart and support both number and string as parameters.

Examples

getSize(string or number, {PrecisionValue}): returns String

  • Direct Method Call
FileSize.getSize(1000)               '1.00 KB'
FileSize.getSize(1048576)            '1.04 MB'
FileSize.getSize(1073741824)         '1.00 GB'
FileSize.getSize(1099511627776)      '1.00 TB'
  • Method call with PrecisionValue [Optional]
FileSize.getSize(664365320, PrecisionValue.THREE)      "633.588 MB"
FileSize.getSize(4324324232343, PrecisionValue.FOUR)   "3.9321 TB"
  • Method call without decimal value
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'