-
-
Notifications
You must be signed in to change notification settings - Fork 275
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
Conversation
_productList.getRobotoffQuestions(barcode); | ||
if (questions != null && | ||
questions.questions != null && | ||
questions.questions!.isNotEmpty) { |
There was a problem hiding this comment.
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)) { |
There was a problem hiding this comment.
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.
Gonna abandon this change and create a new one after #645 is merged |
@jasmeet0817 #645 is merged. |
This is for a hackathon to start asking questions to users:
This is how it currently looks
Don't worry too much about cosmetic changes as the scan card itself is going to change in the future