DensityUnit class abstract

Base class for all Density units.

Inheritance
Implementers

Constructors

DensityUnit(String unit, String symbol, double conversionFactor)
const

Properties

conversionFactor double
The factor that converts a value in this unit to the internal base.
finalinherited
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
symbol String
The display symbol for this unit (e.g. 'm', 'kg').
finalinherited
unit String
The canonical name of this unit (e.g. 'meter', 'kilogram').
finalinherited

Methods

call(num value) Density
Creates a quantity of value expressed in this unit.
override
converterFrom(double value) double
Converts value expressed in this unit to the internal base value.
inherited
converterTo(double value) double
Converts value expressed in the internal base to this unit.
inherited
convertFrom(num value) double
Convenience wrapper: converts value in this unit to the internal base.
inherited
convertTo(num value) double
Convenience wrapper: converts value to this unit's representation from the internal base.
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