getValue method

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

Returns the value in grams of that nutrient for that perSize.

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

Implementation

double? getValue(final Nutrient nutrient, final PerSize perSize) =>
    _map[_getTag(nutrient, perSize)];