Volume class

Inheritance

Constructors

Volume.new({int significantFigures = 10, bool removeTrailingZeros = true, bool useScientificNotation = true, dynamic name})
Class for volume conversions, e.g. if you want to convert 1 liter in US Gallons:

Properties

australianTablespoons Unit
no setter
cubicCentimeters Unit
no setter
cubicFeet Unit
no setter
cubicInches Unit
no setter
cubicMeters Unit
no setter
cubicMillimeters Unit
no setter
cups Unit
no setter
hashCode int
The hash code for this object.
no setterinherited
imperialFluidOunces Unit
no setter
imperialGallons Unit
no setter
imperialGill Unit
no setter
imperialPints Unit
no setter
liters Unit
no setter
milliliters Unit
no setter
name ↔ dynamic
The name of the Property. If it is not a custom Property is one of the values of PROPERTY.
getter/setter pairinherited
removeTrailingZeros bool
Whether to remove the trailing zeros or not. E.g 1.00000000 has 9 significant figures and has trailing zeros. 1 has not trailing zeros.
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
significantFigures int
The number of significan figures to keep. E.g. 1.23456789) has 9 significant figures
getter/setter pair
size int
The size of the Property, i.e. the number of the Units that belong to that Property.
getter/setter pairinherited
tablespoonsUs Unit
no setter
useScientificNotation bool
Whether to use the scientific notation (true) for stringValues or decimal notation (false)
getter/setter pair
usFluidOunces Unit
no setter
usGallons Unit
no setter
usGill Unit
no setter
usPints Unit
no setter

Methods

convert(VOLUME name, double? value) → void
Converts a unit with a specific name (e.g. VOLUME.cubic_feet) and value to all other units
override
getAll() List<Unit>
Returns all the units converted with prefixes
override
getUnit(dynamic name) Unit
Returns the Unit with the corresponding name
override
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

Constants

mapSymbols → const Map<VOLUME, String?>
Map between units and its symbol