Energy class
An amount of energy, stored canonically in kilocalories.
Kilocalories rather than joules because that is what both platforms and every fitness UI actually use.
- Implemented types
- Annotations
Constructors
- Energy.joules(double joules)
-
Creates an energy from joules.
const
- Energy.kilocalories(double kilocalories)
-
Creates an energy from kilocalories.
const
- Energy.kilojoules(double kj)
-
Creates an energy from kilojoules.
const
Properties
- hashCode → int
-
The hash code for this object.
no setteroverride
- joules → double
-
In joules.
no setter
- kilocalories → double
-
The canonical value.
final
- kilojoules → double
-
In kilojoules.
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
compareTo(
Energy other) → int -
Compares this object to another object.
override
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
override