Unit class abstract

An abstract class to provide a template for units.

https://en.wikipedia.org/wiki/Unit_of_measurement

Implemented types
Implementers
Available Extensions
Annotations
  • @immutable

Constructors

Unit(Object? value)
An abstract class to provide a template for units.

Properties

base Unit
The base unit.
no setter
formatted num
The formatted value.
no setter
hashCode int
The hash code for this object.
no setteroverride
name String
The name of this unit.
no setter
pluralName String
The plural name for this unit.
no setter
prefix UnitPrefix
The unit prefix for this value.
no setter
prefixType Type
The type of prefix used for this unit.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
symbol String
The symbol for this unit.
no setter
value num
The precise value.
no setter

Methods

compareTo(Unit other) int
Compares this object to another object.
override
fromBase(num base) num
Converts from the base unit to this unit.
newInstance([Object? value]) Unit
Creates a new instance of this class.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toBase() num
Converts this unit to the base unit.
toString() String
A string representation of this object.
override

Operators

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