OrderedNutrient class

Nutrient, as a hierarchically ordered and localized entity.

cf. https://github.com/openfoodfacts/openfoodfacts-dart/issues/210 Example in https://fr.openfoodfacts.org/cgi/nutrients.pl To be compared to OrderedNutrients, which is the root of the structure.

Inheritance

Constructors

OrderedNutrient({required bool important, required String id, required bool displayInEditForm, String? name, List<OrderedNutrient>? subNutrients})
OrderedNutrient.fromJson(Map<String, dynamic> json)
factory

Properties

displayInEditForm bool
final
hashCode int
The hash code for this object.
no setterinherited
id String
Nutrient ID (e.g. 'energy-kcal')
final
important bool
final
name String?
Localized nutrient name (e.g. 'EnergĂ­a (kcal)' in Spanish)
final
nutrient Nutrient?
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
subNutrients List<OrderedNutrient>?
Hierarchically related nutrients
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toData() Map<String, String>
inherited
toJson() Map<String, dynamic>
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