UnitMass class
Class that represents a measurement of mass.
Constructors
- UnitMass(double value, UnitMassType unit)
-
Creates a new
UnitMass
object. -
UnitMass.fromJson(Map<
String, dynamic> json) -
Creates a
UnitMass
object from a JSON map.factory
Properties
- converter ↔ double
-
getter/setter pairinherited
- hashCode → int
-
Calculates the hash code for this
UnitMass
object.no setteroverride - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- symbol ↔ String
-
getter/setter pairinherited
- unit → UnitMassType
-
The type of unit used for the mass measurement.
final
- value ↔ double
-
getter/setter pairinherited
Methods
-
division(
Unit divide) → double -
Divides the current unit by another unit.
override
-
gramsValue(
) → double - Converts the mass value to grams.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
plus(
Unit? add) → Unit -
Adds another unit to the current unit.
override
-
times(
double mult) → Unit -
Multiplies the mass value by a scalar.
override
-
toJson(
) → Map< String, dynamic> -
Converts the
UnitMass
object to a JSON map. -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator *(
double mult) → Unit -
inherited
-
operator +(
UnitMass? add) → Unit -
inherited
-
operator /(
UnitMass divide) → double -
inherited
-
operator ==(
Object other) → bool -
Compares two
UnitMass
objects for equality.override