getProductInsights static method
Implementation
static Future<InsightsResult> getProductInsights(
String barcode,
User user, {
QueryType? queryType,
}) async {
var insightsUri = UriHelper.getRobotoffUri(
path: 'api/v1/insights/$barcode',
queryType: queryType,
);
Response response = await HttpHelper().doGetRequest(
insightsUri,
user: user,
queryType: queryType,
);
return InsightsResult.fromJson(
json.decode(utf8.decode(response.bodyBytes)));
}