getProductNameBrand method
Returns a combo of the best product name and the first brand.
cf. openfoodfacts-server/lib/ProductOpener/Products.pm
Implementation
String getProductNameBrand(
final OpenFoodFactsLanguage language,
final String separator,
) {
final String bestProductName = getBestProductName(language);
final String? firstBrand = getFirstBrand();
if (firstBrand == null) {
return bestProductName;
}
return '$bestProductName$separator$firstBrand';
}