getValue method

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

Returns the value of that nutrient for that perSize.

It won't be in grams for very specific nutrients, like Nutrient.alcohol.

Implementation

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