PortionHelper class
Helper class that computes the values of each nutrient for a portion.
Constructors
-
PortionHelper(List<
OrderedNutrient> localizedNutrients, Product product, int grams)
Properties
- grams → int
-
Size of the portion, in grams.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- isEmpty → bool
-
True if no result computed at all.
no setter
- length → int
-
Number of successfully computed nutrients.
no setter
- product → Product
-
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
getName(
int index) → String -
Localized name of the
indexth nutrient. -
getValue(
int index) → String -
Value + unit of the
indexth nutrient. -
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