-
-
Notifications
You must be signed in to change notification settings - Fork 313
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
feat: 5594 - multi product scan mode as a dev mode option for price receipt input #6008
feat: 5594 - multi product scan mode as a dev mode option for price receipt input #6008
Conversation
…eceipt input Impacted files: * `price_add_product_card.dart`: now calling the scan card with the bool multi product scan mode parameter, and manages a _list_ of scanned barcodes * `price_scan_page.dart`: now manages a multi product scan mode, with floating action button and snackbar * `user_preferences_dev_mode.dart`: new flag for "multi product scan in price receipt"
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #6008 +/- ##
==========================================
- Coverage 9.54% 6.45% -3.10%
==========================================
Files 325 443 +118
Lines 16411 25181 +8770
==========================================
+ Hits 1567 1625 +58
- Misses 14844 23556 +8712 ☔ View full report in Codecov by Sentry. |
@monsieurtanuki @g123k this would be interesting to quickly populate user lists (eg a shopping list). |
@teolemon That wouldn't be a problem as we already have the tool for that: a camera+scanner that calls an "I've just found that barcode!" method. In this PR the method populates a list of barcodes, pop'ed only when the user clicks on the FAB. If you have a new idea for user lists, please create a specific issue. |
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.
One feedback, but otherwise OK
return false; | ||
} | ||
|
||
final List<String> alreadyThere = <String>[]; |
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.
I think you can use a Set
directly and thus remove barcodeAlreadyThere
, by calling only the Set.contain
method.
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.
I think you can use a
Set
directly and thus removebarcodeAlreadyThere
, by calling only theSet.contain
method.
Indeed, but I assumed the order was important too for the user, and Set is unordered.
Thank you @g123k for your numerous approvals, it's like an early Xmas! |
What
Screenshots
Fixes bug(s)
Impacted files
price_add_product_card.dart
: now calling the scan card with the bool multi product scan mode parameter, and manages a list of scanned barcodesprice_scan_page.dart
: now manages a multi product scan mode, with floating action button and snackbaruser_preferences_dev_mode.dart
: new flag for "multi product scan in price receipt"