fromOffTag static method
- String? offTag
override
Returns the first Nutrient that matches the offTag
.
Special case for offTag
'energy', which can be found in
OrderedNutrient, and is a duplicate of 'energy-kj'.
Implementation
static Nutrient? fromOffTag(final String? offTag) => offTag == 'energy'
? Nutrient.energyKJ
: OffTagged.fromOffTag(offTag, Nutrient.values) as Nutrient?;