UnitEnergy class
Class that represents a measurement of energy.
Constructors
- UnitEnergy(double value, UnitEnergyType unit)
-
Creates a new
UnitEnergy
object with a specific value and unit type. -
UnitEnergy.fromJson(Map<
String, dynamic> json) -
Creates a
UnitEnergy
object from a JSON map.factory
Properties
- converter ↔ double
-
getter/setter pairinherited
- hashCode → int
-
The hash code for this object.
no setteroverride
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- symbol ↔ String
-
getter/setter pairinherited
- unit → UnitEnergyType
-
The type of unit used for the energy measurement.
final
- value ↔ double
-
getter/setter pairinherited
Methods
-
division(
Unit divide) → double -
Currently not implemented. Throws an exception if called.
override
-
kcalValue(
) → double - Converts the energy value to kilocalories (kcal).
-
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 energy value by a scalar.
override
-
toJson(
) → Map< String, dynamic> -
Converts the
UnitEnergy
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 -
The equality operator.
override