Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Hackathon] Show a prompt to users to answer questions after they scan a product. #636

Closed
wants to merge 25 commits into from

Conversation

jasmeet0817
Copy link
Contributor

This is for a hackathon to start asking questions to users:

This is how it currently looks
image

Don't worry too much about cosmetic changes as the scan card itself is going to change in the future

_productList.getRobotoffQuestions(barcode);
if (questions != null &&
questions.questions != null &&
questions.questions!.isNotEmpty) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sugg: questions?.questions?.isNotEmpty ?? false

@@ -268,6 +271,22 @@ class ProductList {
return true;
}

RobotoffQuestionResult? getRobotoffQuestions(String barcode) {
if (_productQuestions.containsKey(barcode)) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note that you don't have to make this check, since _productQuestions[barcode] returns null when the key is not found.

@jasmeet0817
Copy link
Contributor Author

jasmeet0817 commented Oct 29, 2021

Gonna abandon this change and create a new one after #645 is merged

@teolemon teolemon linked an issue Nov 15, 2021 that may be closed by this pull request
@monsieurtanuki
Copy link
Contributor

Gonna abandon this change and create a new one after #645 is merged

@jasmeet0817 #645 is merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Implement a points system with gamification
5 participants