setValue method

Nutriments setValue(
  1. Nutrient nutrient,
  2. PerSize perSize,
  3. double? value
)

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

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

Implementation

Nutriments setValue(
  final Nutrient nutrient,
  final PerSize perSize,
  final double? value,
) {
  _map[_getTag(nutrient, perSize)] = value;
  return this;
}