DataSize class

Data size helper to help to calculate bytes/kilobytes, etc...

Constructors

DataSize({int kilobytes = 0, int megabytes = 0, int gigabytes = 0, int terabytes = 0, int bytes = 0})
Create DataSize object with predefined size as optional.
DataSize.bytes(int value)
Creates DataSize object with bytes value.
factory
DataSize.giga(int value)
Creates DataSize object with giga bytes value.
factory
DataSize.kilo(int value)
Creates DataSize object with kilo bytes value.
factory
DataSize.mega(int value)
Creates DataSize object with mega bytes value.
factory
DataSize.tera(int value)
Creates DataSize object with tera bytes value.
factory

Properties

hashCode int
The hash code for this object.
no setterinherited
realSize int
Real size in bytes.
getter/setter pair
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.
override

Operators

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

Constants

byteInMega → const int
Mega bytes value in bytes
bytesInGiga → const int
Giga bytes value in bytes
bytesInKilo → const int
Kilo bytes value in bytes
bytesInTera → const int
Tera bytes value in bytes