format_bytes library

Format raw byte amounts as pretty strings.

Classes

Unit
Describes a storage amount unit [...]

Constants

defaultFormatString → const String
'locale default'
defaultSeparator → const String
defaultFormatString

Functions

createPrecisionFormatter(int minDecimals, int maxDecimals, int maxPrecision, String locale) AmountToString
Creates a AmountToString transformer with specified precision. [...]
format(num amount, {String locale = 'en', String formatString = defaultFormatString, String separator = defaultSeparator, AmountToString customAmountTransformer, int minDecimals = 0, int maxDecimals = 2, int maxPrecision = -1, Unit unit = Unit.auto, UnitType unitType = UnitType.binary}) String
Formats a byte amount as human readable string. [...]

Enums

UnitType
Binary ot Decimal based unit [...]

Typedefs

AmountToString(double amount) String
A function that transforms double to String. [...]