getComputedValue method

double? getComputedValue(
  1. Nutrient nutrient,
  2. PerSize perSize
)

Returns the computed value of that nutrient for that perSize.

Typical use-case is when the "real" unit is "% DV" or "IU": with that method we get the computed value, in grams for weight. Rather use getValue and getUnit instead.

Implementation

double? getComputedValue(final Nutrient nutrient, final PerSize perSize) =>
    JsonObject.parseDouble(jsonMap[_getValuePerSizeTag(nutrient, perSize)]);