changeProduct method

  1. @override
void changeProduct(
  1. Product changedProduct
)
override

Impacts a product in order to take the changes into account.

Implementation

@override
void changeProduct(Product changedProduct) {
  // for the local change
  changedProduct.labelsTagsInLanguages =
      <OpenFoodFactsLanguage, List<String>>{getLanguage(): terms};
  // for the server - write-only
  changedProduct.labels = terms.join(separator);
}