productLanguages method

List<ProductLanguageWithState> productLanguages(
  1. Product product
)

Implementation

List<ProductLanguageWithState> productLanguages(Product product) {
  return getProductImageLanguages(product, imageField)
      .map(
        (OpenFoodFactsLanguage l) => ProductLanguageWithState(
          language: l,
          state: languagesWithText.contains(l)
              ? OpenFoodFactsLanguageState.normal
              : OpenFoodFactsLanguageState.warning,
        ),
      )
      .toList(growable: false);
}