Nutriments class

Values in nutrients.

Inheritance

Constructors

Nutriments({double? salt, double? fiber, double? sugars, double? fat, double? saturatedFat, double? proteins, int? novaGroup, double? energy, double? energyKcal, double? energyKj, double? energyKcal100g, double? carbohydrates, double? saltServing, double? fiberServing, double? sugarsServing, double? fatServing, Unit? fatUnit, double? saturatedFatServing, double? proteinsServing, Unit? proteinsUnit, int? novaGroupServing, double? energyServing, double? carbohydratesServing, Unit? carbohydratesUnit, Unit? energyKcalUnit, Unit? energyUnit, double? caffeineServing, double? caffeine, Unit? caffeineUnit, double? calciumServing, double? calcium, Unit? calciumUnit, double? ironServing, double? iron, Unit? ironUnit, double? vitaminC, double? vitaminCServing, Unit? vitaminCUnit, double? magnesium, double? magnesiumServing, Unit? magnesiumUnit, double? phosphorus, double? phosphorusServing, Unit? phosphorusUnit, double? potassium, double? potassiumServing, Unit? potassiumUnit, double? chloride, double? chlorideServing, Unit? chlorideUnit, double? sodium, double? sodiumServing, Unit? sodiumUnit, double? zinc, double? zincServing, Unit? zincUnit, double? copper, double? copperServing, Unit? copperUnit, double? manganese, double? manganeseServing, Unit? manganeseUnit, double? fluoride, double? fluorideServing, Unit? fluorideUnit, double? selenium, double? seleniumServing, Unit? seleniumUnit, double? chromium, double? chromiumServing, Unit? chromiumUnit, double? molybdenum, double? molybdenumServing, Unit? molybdenumUnit, double? iodine, double? iodineServing, Unit? iodineUnit, double? vitaminA, double? vitaminAServing, Unit? vitaminAUnit, double? vitaminE, double? vitaminEServing, Unit? vitaminEUnit, double? vitaminD, double? vitaminDServing, Unit? vitaminDUnit, double? vitaminB1, double? vitaminB1Serving, Unit? vitaminB1Unit, double? vitaminB2, double? vitaminB2Serving, Unit? vitaminB2Unit, double? vitaminPP, double? vitaminPPServing, Unit? vitaminPPUnit, double? vitaminB6, double? vitaminB6Serving, Unit? vitaminB6Unit, double? vitaminK, double? vitaminKServing, Unit? vitaminKUnit, double? vitaminB12, double? vitaminB12Serving, Unit? vitaminB12Unit, double? vitaminB9, double? vitaminB9Serving, Unit? vitaminB9Unit, double? biotin, double? biotinServing, Unit? biotinUnit, double? pantothenicAcid, double? pantothenicAcidServing, Unit? pantothenicAcidUnit, double? transFat, double? transFatServing, Unit? transFatUnit, double? cholesterol, double? cholesterolServing, Unit? cholesterolUnit, double? alcohol, double? alcoholServing, Unit? alcoholUnit, double? butyricAcid, double? butyricAcidServing, Unit? butyricAcidUnit, double? capricAcid, double? capricAcidServing, Unit? capricAcidUnit, double? caproicAcid, double? caproicAcidServing, Unit? caproicAcidUnit, double? caprylicAcid, double? caprylicAcidServing, Unit? caprylicAcidUnit, double? docosahexaenoicAcid, double? docosahexaenoicAcidServing, Unit? docosahexaenoicAcidUnit, double? eicosapentaenoicAcid, double? eicosapentaenoicAcidServing, Unit? eicosapentaenoicAcidUnit, double? erucicAcid, double? erucicAcidServing, Unit? erucicAcidUnit, double? lauricAcid, double? lauricAcidServing, Unit? lauricAcidUnit, double? linoleicAcid, double? linoleicAcidServing, Unit? linoleicAcidUnit, double? monounsaturatedAcid, double? monounsaturatedServing, Unit? monounsaturatedUnit, double? myristicAcid, double? myristicAcidServing, Unit? myristicAcidUnit, double? oleicAcid, double? oleicAcidServing, Unit? oleicAcidUnit, double? palmiticAcid, double? palmiticAcidServing, Unit? palmiticAcidUnit, double? polyunsaturatedAcid, double? polyunsaturatedServing, Unit? polyunsaturatedUnit, double? omega3Fat, double? omega3FatServing, Unit? omega3FatUnit, double? omega6Fat, double? omega6FatServing, Unit? omega6FatUnit, double? stearicAcid, double? stearicAcidServing, Unit? stearicAcidUnit})
Nutriments.empty()
Empty nutrient map.
Nutriments.fromJson(Map<String, dynamic> json)
factory

Properties

alcohol double?
Alcohol, in % vol, per 100g of product as sold
getter/setter pair
alcoholServing double?
Alcohol, in % vol, per serving of product as sold
getter/setter pair
alcoholUnit Unit?
Typical Unit for Alcohol
getter/setter pair
biotin double?
Biotin, in grams, per 100 grams of product as sold
getter/setter pair
biotinServing double?
Biotin, in grams, per serving of product as sold
getter/setter pair
biotinUnit Unit?
Typical Unit for Biotin
getter/setter pair
butyricAcid double?
Butyric Acid, in grams, per 100 grams of product as sold
getter/setter pair
butyricAcidServing double?
Butyric Acid, in grams, per serving of product as sold
getter/setter pair
butyricAcidUnit Unit?
Typical Unit for Butyric Acid
getter/setter pair
caffeine double?
Caffeine, in grams, per 100 grams of product as sold
getter/setter pair
caffeineServing double?
Caffeine, in grams, per serving of product as sold
getter/setter pair
caffeineUnit Unit?
Typical Unit for Caffeine
getter/setter pair
calcium double?
Calcium, in grams, per 100 grams of product as sold
getter/setter pair
calciumServing double?
Calcium, in grams, per serving of product as sold
getter/setter pair
calciumUnit Unit?
Typical Unit for Calcium
getter/setter pair
capricAcid double?
Capric Acid, in grams, per 100 grams of product as sold
getter/setter pair
capricAcidServing double?
Capric Acid, in grams, per serving of product as sold
getter/setter pair
capricAcidUnit Unit?
Typical Unit for Capric Acid
getter/setter pair
caproicAcid double?
Caproic Acid, in grams, per 100 grams of product as sold
getter/setter pair
caproicAcidServing double?
Caproic Acid, in grams, per serving of product as sold
getter/setter pair
caproicAcidUnit Unit?
Typical Unit for Caproic Acid
getter/setter pair
caprylicAcid double?
Caprylic Acid, in grams, per 100 grams of product as sold
getter/setter pair
caprylicAcidServing double?
Caprylic Acid, in grams, per serving of product as sold
getter/setter pair
caprylicAcidUnit Unit?
Typical Unit for Caprylic Acid
getter/setter pair
carbohydrates double?
Carbohydrates, in grams, per 100 grams of product as sold
getter/setter pair
carbohydratesServing double?
Carbohydrates, in grams, per serving of product as sold
getter/setter pair
carbohydratesUnit Unit?
Typical Unit for Carbohydrates
getter/setter pair
chloride double?
Chloride, in grams, per 100 grams of product as sold
getter/setter pair
chlorideServing double?
Chloride, in grams, per serving of product as sold
getter/setter pair
chlorideUnit Unit?
Typical Unit for Chloride
getter/setter pair
cholesterol double?
Cholesterol, in grams, per 100 grams of product as sold
getter/setter pair
cholesterolServing double?
Cholesterol, in grams, per serving of product as sold
getter/setter pair
cholesterolUnit Unit?
Typical Unit for Cholesterol
getter/setter pair
chromium double?
Chromium, in grams, per 100 grams of product as sold
getter/setter pair
chromiumServing double?
Chromium, in grams, per serving of product as sold
getter/setter pair
chromiumUnit Unit?
Typical Unit for Chromium
getter/setter pair
copper double?
Copper, in grams, per 100 grams of product as sold
getter/setter pair
copperServing double?
Copper, in grams, per serving of product as sold
getter/setter pair
copperUnit Unit?
Typical Unit for Copper
getter/setter pair
docosahexaenoicAcid double?
Docosahexaenoic Acid, in grams, per 100 grams of product as sold
getter/setter pair
docosahexaenoicAcidServing double?
Docosahexaenoic Acid, in grams, per serving of product as sold
getter/setter pair
docosahexaenoicAcidUnit Unit?
Typical Unit for Docosahexaenoic Acid
getter/setter pair
eicosapentaenoicAcid double?
Eicosapentaenoic Acid, in grams, per 100 grams of product as sold
getter/setter pair
eicosapentaenoicAcidServing double?
Eicosapentaenoic Acid, in grams, per serving of product as sold
getter/setter pair
eicosapentaenoicAcidUnit Unit?
Typical Unit for Eicosapentaenoic Acid
getter/setter pair
energy double?
Energy, in kJ, per 100 grams of product as sold
getter/setter pair
energyKcal double?
Energy, in kcal, per 100 grams of product as sold
getter/setter pair
energyKcal100g double?
Energy, in kcal, per 100 grams of product as sold
getter/setter pair
energyKcalServing double?
Energy, in kcal, per serving of product as sold
getter/setter pair
energyKcalUnit Unit?
Typical Unit for Energy kcal (probably Unit.KCAL)
getter/setter pair
energyKJ double?
no getter
energyKj double?
Energy, in kj, per 100 grams of product as sold
getter/setter pair
energyKj100g double?
Energy, in kj, per 100 grams of product as sold
no setter
energyKjServing double?
Energy, in kj, per serving of product as sold
getter/setter pair
energyServing double?
Energy, in kJ, per serving of product as sold
getter/setter pair
energyUnit Unit
Typical Unit for Energy (probably Unit.KJ)
getter/setter pair
erucicAcid double?
Erucic Acid, in grams, per 100 grams of product as sold
getter/setter pair
erucicAcidServing double?
Erucic Acid, in grams, per serving of product as sold
getter/setter pair
erucicAcidUnit Unit?
Typical Unit for Erucic Acid
getter/setter pair
fat double?
Fats, in grams, per 100 grams of product as sold
getter/setter pair
fatServing double?
Fats, in grams, per serving of product as sold
getter/setter pair
fatUnit Unit?
Typical Unit for Fat
getter/setter pair
fiber double?
Fibers, in grams, per 100 grams of product as sold
getter/setter pair
fiberServing double?
Fibers, in grams, per serving of product as sold
getter/setter pair
fluoride double?
Fluoride, in grams, per 100 grams of product as sold
getter/setter pair
fluorideServing double?
Fluoride, in grams, per serving of product as sold
getter/setter pair
fluorideUnit Unit?
Typical Unit for Fluoride
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
iodine double?
Iodine, in grams, per 100 grams of product as sold
getter/setter pair
iodineServing double?
Iodine, in grams, per serving of product as sold
getter/setter pair
iodineUnit Unit?
Typical Unit for Iodine
getter/setter pair
iron double?
Iron, in grams, per 100 grams of product as sold
getter/setter pair
ironServing double?
Iron, in grams, per serving of product as sold
getter/setter pair
ironUnit Unit?
Typical Unit for Iron
getter/setter pair
lauricAcid double?
Lauric Acid, in grams, per 100 grams of product as sold
getter/setter pair
lauricAcidServing double?
Lauric Acid, in grams, per serving of product as sold
getter/setter pair
lauricAcidUnit Unit?
Typical Unit for Lauric Acid
getter/setter pair
linoleicAcid double?
Linoleic Acid, in grams, per 100 grams of product as sold
getter/setter pair
linoleicAcidServing double?
Linoleic Acid, in grams, per serving of product as sold
getter/setter pair
linoleicAcidUnit Unit?
Typical Unit for Linoleic Acid
getter/setter pair
magnesium double?
Magnesium, in grams, per 100 grams of product as sold
getter/setter pair
magnesiumServing double?
Magnesium, in grams, per serving of product as sold
getter/setter pair
magnesiumUnit Unit?
Typical Unit for Magnesium
getter/setter pair
manganese double?
Manganese, in grams, per 100 grams of product as sold
getter/setter pair
manganeseServing double?
Manganese, in grams, per serving of product as sold
getter/setter pair
manganeseUnit Unit?
Typical Unit for Manganese
getter/setter pair
molybdenum double?
Molybdenum, in grams, per 100 grams of product as sold
getter/setter pair
molybdenumServing double?
Molybdenum, in grams, per serving of product as sold
getter/setter pair
molybdenumUnit Unit?
Typical Unit for Molybdenum
getter/setter pair
monounsaturatedAcid double?
Monounsaturated Fats, in grams, per 100 grams of product as sold
getter/setter pair
monounsaturatedServing double?
Monounsaturated Fats, in grams, per serving of product as sold
getter/setter pair
monounsaturatedUnit Unit?
Typical Unit for Monounsaturated Fats
getter/setter pair
myristicAcid double?
Myristic Acid, in grams, per 100 grams of product as sold
getter/setter pair
myristicAcidServing double?
Myristic Acid, in grams, per serving of product as sold
getter/setter pair
myristicAcidUnit Unit?
Typical Unit for Myristic Acid
getter/setter pair
novaGroup int?
Nova Group
getter/setter pair
novaGroupServing int?
Nova Group per serving (?)
getter/setter pair
oleicAcid double?
Oleic Acid, in grams, per 100 grams of product as sold
getter/setter pair
oleicAcidServing double?
Oleic Acid, in grams, per serving of product as sold
getter/setter pair
oleicAcidUnit Unit?
Typical Unit for Oleic Acid
getter/setter pair
omega3Fat double?
Omega 3, in grams, per 100 grams of product as sold
getter/setter pair
omega3FatServing double?
Omega 3, in grams, per serving of product as sold
getter/setter pair
omega3FatUnit Unit?
Typical Unit for Omega 3
getter/setter pair
omega6Fat double?
Omega 6, in grams, per 100 grams of product as sold
getter/setter pair
omega6FatServing double?
Omega 6, in grams, per serving of product as sold
getter/setter pair
omega6FatUnit Unit?
Typical Unit for Omega 6
getter/setter pair
palmiticAcid double?
Palmitic Acid, in grams, per 100 grams of product as sold
getter/setter pair
palmiticAcidServing double?
Palmitic Acid, in grams, per serving of product as sold
getter/setter pair
palmiticAcidUnit Unit?
Typical Unit for Palmitic Acid
getter/setter pair
pantothenicAcid double?
Pantothenic Acid, in grams, per 100 grams of product as sold
getter/setter pair
pantothenicAcidServing double?
Pantothenic Acid, in grams, per serving of product as sold
getter/setter pair
pantothenicAcidUnit Unit?
Typical Unit for Pantothenic Acid
getter/setter pair
phosphorus double?
Phosphorus, in grams, per 100 grams of product as sold
getter/setter pair
phosphorusServing double?
Phosphorus, in grams, per serving of product as sold
getter/setter pair
phosphorusUnit Unit?
Typical Unit for Phosphorus
getter/setter pair
polyunsaturatedAcid double?
Polyunsaturated Fats, in grams, per 100 grams of product as sold
getter/setter pair
polyunsaturatedServing double?
Polyunsaturated Fats, in grams, per serving of product as sold
getter/setter pair
polyunsaturatedUnit Unit?
Typical Unit for Polyunsaturated Fats
getter/setter pair
potassium double?
Potassium, in grams, per 100 grams of product as sold
getter/setter pair
potassiumServing double?
Potassium, in grams, per serving of product as sold
getter/setter pair
potassiumUnit Unit?
Typical Unit for Potassium
getter/setter pair
proteins double?
Proteins, in grams, per 100 grams of product as sold
getter/setter pair
proteinsServing double?
Proteins, in grams, per serving of product as sold
getter/setter pair
proteinsUnit Unit?
Typical Unit for Proteins (probably Unit.G)
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
salt double?
Salt, in grams, per 100 grams of product as sold
getter/setter pair
saltServing double?
Salt, in grams, per serving of product as sold
getter/setter pair
saturatedFat double?
Saturated Fats, in grams, per 100 grams of product as sold
getter/setter pair
saturatedFatServing double?
Saturated Fats, in grams, per serving of product as sold
getter/setter pair
selenium double?
Selenium, in grams, per 100 grams of product as sold
getter/setter pair
seleniumServing double?
Selenium, in grams, per serving of product as sold
getter/setter pair
seleniumUnit Unit?
Typical Unit for Selenium
getter/setter pair
sodium double?
Sodium, in grams, per 100 grams of product as sold
getter/setter pair
sodiumServing double?
Sodium, in grams, per serving of product as sold
getter/setter pair
sodiumUnit Unit?
Typical Unit for Sodium
getter/setter pair
stearicAcid double?
Stearic Acid, in grams, per 100 grams of product as sold
getter/setter pair
stearicAcidServing double?
Stearic Acid, in grams, per serving of product as sold
getter/setter pair
stearicAcidUnit Unit?
Typical Unit for Stearic Acid
getter/setter pair
sugars double?
Sugars, in grams, per 100 grams of product as sold
getter/setter pair
sugarsServing double?
Sugars, in grams, per serving of product as sold
getter/setter pair
transFat double?
Trans Fats, in grams, per 100 grams of product as sold
getter/setter pair
transFatServing double?
Trans Fats, in grams, per serving of product as sold
getter/setter pair
transFatUnit Unit?
Typical Unit for Trans Fats
getter/setter pair
vitaminA double?
Vitamin A, in grams, per 100 grams of product as sold
getter/setter pair
vitaminAServing double?
Vitamin A, in grams, per serving of product as sold
getter/setter pair
vitaminAUnit Unit?
Typical Unit for Vitamin A
getter/setter pair
vitaminB1 double?
Vitamin B1, in grams, per 100 grams of product as sold
getter/setter pair
vitaminB1Serving double?
Vitamin B1, in grams, per serving of product as sold
getter/setter pair
vitaminB1Unit Unit?
Typical Unit for Vitamin B1
getter/setter pair
vitaminB2 double?
Vitamin B2, in grams, per 100 grams of product as sold
getter/setter pair
vitaminB2Serving double?
Vitamin B2, in grams, per serving of product as sold
getter/setter pair
vitaminB2Unit Unit?
Typical Unit for Vitamin B2
getter/setter pair
vitaminB6 double?
Vitamin B6, in grams, per 100 grams of product as sold
getter/setter pair
vitaminB6Serving double?
Vitamin B6, in grams, per serving of product as sold
getter/setter pair
vitaminB6Unit Unit?
Typical Unit for Vitamin B6
getter/setter pair
vitaminB9 double?
Vitamin B1, in grams, per 100 grams of product as sold
getter/setter pair
vitaminB9Serving double?
Vitamin B9, in grams, per serving of product as sold
getter/setter pair
vitaminB9Unit Unit?
Typical Unit for Vitamin B9
getter/setter pair
vitaminB12 double?
Vitamin B12, in grams, per 100 grams of product as sold
getter/setter pair
vitaminB12Serving double?
Vitamin B12, in grams, per serving of product as sold
getter/setter pair
vitaminB12Unit Unit?
Typical Unit for Vitamin B12
getter/setter pair
vitaminC double?
Vitamin C, in grams, per 100 grams of product as sold
getter/setter pair
vitaminCServing double?
Vitamin C, in grams, per serving of product as sold
getter/setter pair
vitaminCUnit Unit?
Typical Unit for Vitamin C
getter/setter pair
vitaminD double?
Vitamin D, in grams, per 100 grams of product as sold
getter/setter pair
vitaminDServing double?
Vitamin D, in grams, per serving of product as sold
getter/setter pair
vitaminDUnit Unit?
Typical Unit for Vitamin D
getter/setter pair
vitaminE double?
Vitamin E, in grams, per 100 grams of product as sold
getter/setter pair
vitaminEServing double?
Vitamin E, in grams, per serving of product as sold
getter/setter pair
vitaminEUnit Unit?
Typical Unit for Vitamin E
getter/setter pair
vitaminK double?
Vitamin K, in grams, per 100 grams of product as sold
getter/setter pair
vitaminKServing double?
Vitamin K, in grams, per serving of product as sold
getter/setter pair
vitaminKUnit Unit?
Typical Unit for Vitamin K
getter/setter pair
vitaminPP double?
Vitamin PP, in grams, per 100 grams of product as sold
getter/setter pair
vitaminPPServing double?
Vitamin PP, in grams, per serving of product as sold
getter/setter pair
vitaminPPUnit Unit?
Typical Unit for Vitamin PP
getter/setter pair
zinc double?
Zinc, in grams, per 100 grams of product as sold
getter/setter pair
zincServing double?
Zinc, in grams, per serving of product as sold
getter/setter pair
zincUnit Unit?
Typical Unit for Zinc
getter/setter pair

Methods

getComputedKJ(PerSize perSize) double?
Returns the energy in kJ for that perSize, direct or computed from kcal.
getUnit(Nutrient nutrient) Unit?
Returns the default Unit of that nutrient.
getValue(Nutrient nutrient, PerSize perSize) double?
Returns the value in grams of that nutrient for that perSize.
isEmpty({bool isNullEmpty = false}) bool
Returns true if there are no populated nutrients at all.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
setValue(Nutrient nutrient, PerSize perSize, double? value) Nutriments
Sets the value in grams of that nutrient for that perSize.
toData() Map<String, String>
inherited
toJson() Map<String, dynamic>
Returns a JSON version of the Nutriments.
override
toString() String
A string representation of this object.
inherited
toValueString() String
Returns all values as a String separated by a hyphen value1 - value2 - value3
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Methods

toJsonHelper(Nutriments? n) Map<String, dynamic>

Constants

supportedNutrientIds → const Set<String>
Nutrient ids supported by Nutriments.