ProperFilesize class

Constructors

ProperFilesize()

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Methods

generateHumanReadableFilesize(num size, {Bases base = Bases.Binary, int decimals = 3}) String
Generates a human readable string in xiB or xB from an int size in bytes Provide base (binary/metric) and decimals Defaults to binary units and 3 decimals
parseHumanReadableFilesize(String input) num
Converts a human readable filesize string (either in metric or in binary units) to an integer number of bytes

Constants

basesString → const Map<Bases, String>
Establishes relation between type of Bases and their human readable representation
basesValue → const Map<Bases, num>
Establishes relation between type of Bases and their logarithmic value
units → const List<String>
Available units