getOrderedNutrients static method
Future<OrderedNutrients>
getOrderedNutrients({
- required String cc,
- required OpenFoodFactsLanguage language,
- QueryType? queryType,
Returns the nutrient hierarchy specific to a country, localized.
cc
is the country code, as ISO 3166-1 alpha-2
Implementation
static Future<OrderedNutrients> getOrderedNutrients({
required final String cc,
required final OpenFoodFactsLanguage language,
final QueryType? queryType,
}) async =>
OrderedNutrients.fromJson(
jsonDecode(
await getOrderedNutrientsJsonString(
country: CountryHelper.fromJson(cc)!,
language: language,
),
),
);