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

Unable to view details of product after scanning. #1725

Closed
bhattabhi013 opened this issue Apr 30, 2022 · 4 comments · Fixed by #1726
Closed

Unable to view details of product after scanning. #1725

bhattabhi013 opened this issue Apr 30, 2022 · 4 comments · Fixed by #1726
Assignees
Labels
🐛 bug Something isn't working 🥫 Product page

Comments

@bhattabhi013
Copy link
Contributor

What

Error: Could not find the correct Provider above this ProductTitleCard Widget

Steps to reproduce the behavior

  1. Scan a product or search for a product.
  2. Click on the product to see the details of the product.
  3. See an error.

Expected behavior

The error shouldn't be visible instead, details should be visible.

Part of

Screenshot/Mockup/Before-After

image

Smartphone model

@bhattabhi013
Copy link
Contributor Author

Can I work on this?

@monsieurtanuki
Copy link
Contributor

@bhattabhi013 For the record today I fixed something similar in #1721.
Perhaps we should move up the provider for ContinuousScanModel, at the same level as the other providers in main.dart.

@bhattabhi013
Copy link
Contributor Author

Hi @monsieurtanuki,
I've 2 approaches to solve this one.

  1. Adding provide<ContinuousScanModel>(_continuousScanModel), in main.dart.
  2. Changing if (isRemovable) to if (isRemovable && !isSelectable) in product_title_card.dart.
    What is more suitable according to you?

@monsieurtanuki
Copy link
Contributor

Hi @bhattabhi013!
I haven't double-checked, but I hope nothing prevents us from adding the provider in main.dart, like "we'll definitely need it sometime anyway, so stop playing hide-and-seek"
Regarding option 2, I don't know if it makes sense, UX-wise. Does it make sense to remove the product from the carousel in the specific issue case - I don't know. Would it make sense to remove it from the current list it belongs to, maybe.

@teolemon teolemon linked a pull request May 1, 2022 that will close this issue
@teolemon teolemon added 🐛 bug Something isn't working 🥫 Product page labels May 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 bug Something isn't working 🥫 Product page
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants