Product constructor
Product({
- String? barcode,
- String? productName,
- Map<
OpenFoodFactsLanguage, String> ? productNameInLanguages, - String? genericName,
- String? brands,
- List<
String> ? brandsTags, - String? countries,
- List<
String> ? countriesTags, - Map<
OpenFoodFactsLanguage, List< ? countriesTagsInLanguages,String> > - OpenFoodFactsLanguage? lang,
- String? quantity,
- String? imageFrontUrl,
- String? imageFrontSmallUrl,
- String? imageIngredientsUrl,
- String? imageIngredientsSmallUrl,
- String? imageNutritionUrl,
- String? imageNutritionSmallUrl,
- String? imagePackagingUrl,
- String? imagePackagingSmallUrl,
- String? servingSize,
- double? servingQuantity,
- double? packagingQuantity,
- List<
ProductImage> ? selectedImages, - List<
ProductImage> ? images, - List<
Ingredient> ? ingredients, - String? ingredientsText,
- Map<
OpenFoodFactsLanguage, String> ? ingredientsTextInLanguages, - List<
String> ? ingredientsTags, - Map<
OpenFoodFactsLanguage, List< ? ingredientsTagsInLanguages,String> > - IngredientsAnalysisTags? ingredientsAnalysisTags,
- Additives? additives,
- EnvironmentImpactLevels? environmentImpactLevels,
- Allergens? allergens,
- NutrientLevels? nutrientLevels,
- String? nutrimentEnergyUnit,
- String? nutrimentDataPer,
- String? nutriscore,
- String? categories,
- List<
String> ? categoriesTags, - Map<
OpenFoodFactsLanguage, List< ? categoriesTagsInLanguages,String> > - String? labels,
- List<
String> ? labelsTags, - Map<
OpenFoodFactsLanguage, List< ? labelsTagsInLanguages,String> > - @Deprecated('Use packagingS field instead') String? packaging,
- List<
String> ? packagingTags, - List<
String> ? miscTags, - List<
String> ? statesTags, - List<
String> ? tracesTags, - List<
String> ? storesTags, - String? stores,
- List<
AttributeGroup> ? attributeGroups, - DateTime? lastModified,
- String? ecoscoreGrade,
- double? ecoscoreScore,
- EcoscoreData? ecoscoreData,
- Nutriments? nutriments,
- bool? noNutritionData,
Implementation
Product(
{this.barcode,
this.productName,
this.productNameInLanguages,
this.genericName,
this.brands,
this.brandsTags,
this.countries,
this.countriesTags,
this.countriesTagsInLanguages,
this.lang,
this.quantity,
this.imageFrontUrl,
this.imageFrontSmallUrl,
this.imageIngredientsUrl,
this.imageIngredientsSmallUrl,
this.imageNutritionUrl,
this.imageNutritionSmallUrl,
this.imagePackagingUrl,
this.imagePackagingSmallUrl,
this.servingSize,
this.servingQuantity,
this.packagingQuantity,
this.selectedImages,
this.images,
this.ingredients,
this.ingredientsText,
this.ingredientsTextInLanguages,
this.ingredientsTags,
this.ingredientsTagsInLanguages,
this.ingredientsAnalysisTags,
this.additives,
this.environmentImpactLevels,
this.allergens,
this.nutrientLevels,
this.nutrimentEnergyUnit,
this.nutrimentDataPer,
this.nutriscore,
this.categories,
this.categoriesTags,
this.categoriesTagsInLanguages,
this.labels,
this.labelsTags,
this.labelsTagsInLanguages,
// TODO: deprecated from 2022-12-16; remove when old enough
@Deprecated('Use packagingS field instead') this.packaging,
this.packagingTags,
this.miscTags,
this.statesTags,
this.tracesTags,
this.storesTags,
this.stores,
this.attributeGroups,
this.lastModified,
this.ecoscoreGrade,
this.ecoscoreScore,
this.ecoscoreData,
Nutriments? nutriments,
bool? noNutritionData})
: _nutriments = nutriments,
_noNutritionData = noNutritionData;