Density class

Inheritance

Constructors

Density({int significantFigures = 10, bool removeTrailingZeros = true, bool useScientificNotation = true, String decimalSeparator = '.', dynamic name})
Class for density conversions, e.g. if you want to convert 1 gram per liter in kilograms per liter:

Properties

decimalSeparator ↔ String
The string used to separate the integer part from the decimal one in stringValues. Default is ".".
getter/setter pairinherited
denominatorProperty ↔ Property
getter/setter pairinherited
gramsPerCubicCentimeter → Unit
no setter
gramsPerDeciliter → Unit
no setter
gramsPerLiter → Unit
no setter
gramsPerMilliliter → Unit
no setter
hashCode → int
The hash code for this object.
no setterinherited
kilogramsPerCubicMeter → Unit
no setter
kilogramsPerLiter → Unit
no setter
mapSymbols ↔ Map<DENSITY, String?>
Map between units and its symbol, must be of the same size of T
getter/setter pairinherited
microgramsPerDeciliter → Unit
no setter
microgramsPerLiter → Unit
no setter
microgramsPerMilliliter → Unit
no setter
milligramsPerCubicCentimeter → Unit
no setter
milligramsPerCubicMeter → Unit
no setter
milligramsPerDeciliter → Unit
no setter
milligramsPerLiter → Unit
no setter
milligramsPerMilliliter → 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
nanogramsPerLiter → Unit
no setter
nanogramsPerMilliliter → Unit
no setter
numeratorProperty ↔ Property
getter/setter pairinherited
picogramsPerLiter → Unit
no setter
picogramsPerMilliliter → Unit
no setter
poundsPerCubicFeet → Unit
no setter
poundsPerCubicInches → Unit
no setter
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 pairinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
significantFigures ↔ int
The number of significant figures to keep. E.g. 1.23456789) has 9 significant figures
getter/setter pairinherited
size ↔ int
The size of the Property, i.e. the number of the Units that belong to that Property.
getter/setter pairinherited
useScientificNotation ↔ bool
Whether to use the scientific notation (true) for stringValues or decimal notation (false)
getter/setter pairinherited

Methods

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