Product class

Inheritance
Annotations

Constructors

Product({String barcode, String productName, String productNameDE, String productNameEN, String productNameFR, String brands, String countries, List<String> countriesTags, OpenFoodFactsLanguage lang, String quantity, String imgSmallUrl, String ingredientsText, String ingredientsTextDE, String ingredientsTextEN, String categories, String nutrimentEnergyUnit, String nutrimentDataPer, String nutriscore, Nutriments nutriments, Additives additives, NutrientLevels nutrientLevels, String servingSize, double servingQuantity, String ecoscoreGrade, double ecoscoreScore})
Product.fromJson(Map<String, dynamic> json)
factory

Properties

additives Additives
@JsonKey(name: 'additives_tags', includeIfNull: false, fromJson: Additives.additivesFromJson, toJson: Additives.additivesToJson), read / write
allergens Allergens
@JsonKey(name: 'allergens_tags', includeIfNull: false, fromJson: Allergens.allergensFromJson, toJson: Allergens.allergensToJson), read / write
attributeGroups List<AttributeGroup>
@JsonKey(name: 'attribute_groups', includeIfNull: false, toJson: JsonHelper.attributeGroupsToJson), read / write
barcode String
@JsonKey(name: 'code', nullable: false), read / write
brands String
read / write
brandsTags List<String>
@JsonKey(name: 'brands_tags', includeIfNull: false), read / write
categories String
@JsonKey(includeIfNull: false), read / write
categoriesTags List<String>
@JsonKey(name: 'categories_tags', includeIfNull: false), read / write
categoriesTagsTranslated List<String>
@JsonKey(name: 'categories_tags_translated', includeIfNull: false), read / write
countries String
@JsonKey(name: 'countries', includeIfNull: false), read / write
countriesTags List<String>
@JsonKey(name: 'countries_tags', includeIfNull: false), read / write
ecoscoreData EcoscoreData
@JsonKey(name: 'ecoscore_data', includeIfNull: false, toJson: EcoscoreData.toJsonHelper), read / write
ecoscoreGrade String
@JsonKey(name: 'ecoscore_grade', includeIfNull: false), read / write
ecoscoreScore double
@JsonKey(name: 'ecoscore_score', includeIfNull: false, fromJson: JsonObject.parseDouble), read / write
environmentImpactLevels EnvironmentImpactLevels
@JsonKey(name: 'environment_impact_level_tags', includeIfNull: false, fromJson: EnvironmentImpactLevels.fromJson, toJson: EnvironmentImpactLevels.toJson), read / write
hashCode int
The hash code for this object. [...]
read-only, inherited
images List<ProductImage>
@JsonKey(name: 'images', includeIfNull: false, fromJson: JsonHelper.imagesFromJson, toJson: JsonHelper.imagesToJson), read / write
imgSmallUrl String
@JsonKey(name: 'image_small_url', includeIfNull: false), read / write
ingredients List<Ingredient>
@JsonKey(includeIfNull: false, toJson: JsonHelper.ingredientsToJson), read / write
ingredientsAnalysisTags IngredientsAnalysisTags
@JsonKey(name: 'ingredients_analysis_tags', includeIfNull: false, fromJson: IngredientsAnalysisTags.fromJson, toJson: IngredientsAnalysisTags.toJson), read / write
ingredientsText String
@JsonKey(name: 'ingredients_text', includeIfNull: false), read / write
ingredientsTextDE String
@JsonKey(name: 'ingredients_text_de', includeIfNull: false), read / write
ingredientsTextEN String
@JsonKey(name: 'ingredients_text_en', includeIfNull: false), read / write
ingredientsTextFR String
@JsonKey(name: 'ingredients_text_fr', includeIfNull: false), read / write
labelsTags List<String>
@JsonKey(name: 'labels_tags', includeIfNull: false), read / write
labelsTagsTranslated List<String>
@JsonKey(name: 'labels_tags_translated', includeIfNull: false), read / write
lang OpenFoodFactsLanguage
@JsonKey(name: 'lang', toJson: LanguageHelper.toJson, fromJson: LanguageHelper.fromJson, includeIfNull: false), read / write
lastModified DateTime
@JsonKey(name: 'last_modified_t', includeIfNull: false, fromJson: JsonHelper.timestampToDate, toJson: JsonHelper.dateToTimestamp), read / write
miscTags List<String>
@JsonKey(name: 'misc', includeIfNull: false), read / write
nutrientLevels NutrientLevels
@JsonKey(name: 'nutrient_levels', includeIfNull: false, fromJson: NutrientLevels.fromJson, toJson: NutrientLevels.toJson), read / write
nutrimentDataPer String
@JsonKey(name: 'nutrition_data_per', includeIfNull: false), read / write
nutrimentEnergyUnit String
@JsonKey(name: 'nutriment_energy_unit', includeIfNull: false), read / write
nutriments Nutriments
@JsonKey(includeIfNull: false, toJson: Nutriments.toJsonHelper), read / write
nutriscore String
@JsonKey(name: 'nutrition_grade_fr', includeIfNull: false), read / write
packagingQuantity ↔ dynamic
@JsonKey(name: 'product_quantity', includeIfNull: false), read / write
productName String
@JsonKey(name: 'product_name', includeIfNull: false), read / write
productNameDE String
@JsonKey(name: 'product_name_de', includeIfNull: false), read / write
productNameEN String
@JsonKey(name: 'product_name_en', includeIfNull: false), read / write
productNameFR String
@JsonKey(name: 'product_name_fr', includeIfNull: false), read / write
quantity String
@JsonKey(includeIfNull: false), read / write
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited
selectedImages List<ProductImage>
cause nesting is sooo cool ;)
@JsonKey(name: 'selected_images', includeIfNull: false, fromJson: JsonHelper.selectedImagesFromJson, toJson: JsonHelper.selectedImagesToJson), read / write
servingQuantity double
@JsonKey(name: 'serving_quantity', fromJson: JsonHelper.servingQuantityFromJson, includeIfNull: false), read / write
servingSize String
@JsonKey(name: 'serving_size', includeIfNull: false), read / write
statesTags List<String>
@JsonKey(name: 'states_tags', includeIfNull: false), read / write
storesTags List<String>
@JsonKey(name: 'stores_tags', includeIfNull: false), read / write
tracesTags List<String>
@JsonKey(name: 'traces_tags', includeIfNull: false), read / write

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent 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

Operators

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