DVSize class final

A byte count. Units are binary: DVSize.mb(1) is 1,048,576 bytes.

Implemented types

Constructors

DVSize.bytes(int bytes)
const
DVSize.gb(int gigabytes)
const
DVSize.kb(int kilobytes)
const
DVSize.mb(int megabytes)
const

Properties

bytes → int
final
hashCode → int
The hash code for this object.
no setteroverride
isPowerOfTwo → bool
no setter
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

compareTo(DVSize other) → int
Compares this object to another object.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
4GB, 1.5GB, 384KB: the largest unit the size reaches, to one decimal place, which is how the diagnostics print it.
override

Operators

operator <(DVSize other) → bool
operator ==(Object other) → bool
The equality operator.
override
operator >(DVSize other) → bool

Static Methods

parse(String text) → DVSize
Reads 4GB, 256MB, 512 mb, 1.5GB or a bare byte count.
tryRead(Object? value) → DVSize?
parse for a value read out of YAML, which may already be an int.