mirror of
https://github.com/openfoodfacts/smooth-app.git
synced 2025-08-14 10:47:24 +08:00
16 lines
440 B
Dart
16 lines
440 B
Dart
import 'package:openfoodfacts/openfoodfacts.dart';
|
|
import 'package:smooth_app/query/product_query.dart';
|
|
|
|
class QuestionsQuery {
|
|
Future<List<RobotoffQuestion>> getQuestions() async {
|
|
final RobotoffQuestionResult result =
|
|
await RobotoffAPIClient.getRandomQuestions(
|
|
ProductQuery.getLanguage()!,
|
|
OpenFoodAPIConfiguration.globalUser,
|
|
count: 3,
|
|
);
|
|
|
|
return result.questions ?? <RobotoffQuestion>[];
|
|
}
|
|
}
|