getProductNutritionsByNutritionId method
Gets all the product nutrition information of the nutrition that matches an id.
Implementation
Future<List<ProductNutrition>> getProductNutritionsByNutritionId(
String id) async {
final response = await _context.client.get(
Uri.https(authority, '$path/nutritions/$id/productnutritions'),
);
ClientException.checkIsSuccessStatusCode(response);
return (json.decode(response.body) as List)
.map((e) => ProductNutrition.fromJson(e))
.toList();
}