getProductRaw static method
- @Deprecated('Use getProductV3 instead')
- String barcode,
- OpenFoodFactsLanguage language, {
- User? user,
- QueryType? queryType,
Returns the product for the given barcode. The ProductResult does not contain a product, if the product is not available. No parsing of ingredients. No adjustment by language. No replacing of '"' with '"'.
Implementation
// TODO: deprecated from 2022-12-01; remove when old enough
@Deprecated('Use getProductV3 instead')
static Future<ProductResult> getProductRaw(
String barcode,
OpenFoodFactsLanguage language, {
User? user,
QueryType? queryType,
}) async {
final String productString = await getProductString(
ProductQueryConfiguration(
barcode,
language: language,
country: null,
fields: null,
),
user: user,
queryType: queryType,
);
return ProductResult.fromJson(json.decode(productString));
}