* feat: add string for retry button
* feat: add method to reload barcode information on internet error
* feat: update localizations and add retry button
* chore: make setBarcodeState private
* feat: Working ML-Kit scanner without adding to ContinuousScanModel
* feat: Fully working ml kit scanner
* Cleanup
* Cleanup + documenting
* Update ml_kit_scan_page.dart
* More abstraction
* Stackoverflow link
* Update ml_kit_scan_page.dart
Co-authored-by: Pierre Slamich <pierre@openfoodfacts.org>
Impacted files:
* `barcode_product_query.dart`: now using global country and language
* `continuous_scan_model.dart`: now using implicitly global country and language
* `country_selector.dart`: fixed the initial country search (lowercase); now setting global country
* `image_upload_card.dart`: now using global language
* `keywords_product_query.dart`: now using global country and language
* `knowledge_panels_query.dart`: now using global country and language
* `main.dart`: now setting global country and language at init time
* `new_product_page.dart`: now using implicitly global country and language
* `product_dialog_helper.dart`: now using implicitly global country and language
* `product_query.dart`: added getter and setter for global country and language
* `smooth_app/pubspec.yaml`: upgraded to 1.8.1 off-dart, therefore we can remove the `dependency_overrides` fix
* `smooth_app/pubspec.lock`: impacted by `pubspec.yaml`
* `smooth_ui_library/pubspec.yaml`: upgraded to 1.8.1 off-dart
* `smooth_ui_library/pubspec.lock`: impacted by `pubspec.yaml`
* `example/pubspec.yaml`: unrelated minor upgrades
* `example/pubspec.lock`: impacted by `pubspec.yaml`
* `scan_page.dart`: now using implicitly global country and language
* `search_page.dart`: now using implicitly global country and language
* `user_preferences.dart`: minor refactoring
Deleted files:
* `attribute_card.dart`
* `attribute_list_expandable.dart`
* `category_card.dart`
* `category_chip.dart`
* `category_product_query.dart`
* `choose_page.dart`
* `group_product_query.dart`
* `product_page.dart`
* `smooth_expandable_card.dart`
* `subcategory_card.dart`
* `text_search_widget.dart`
Impacted files:
* `barcode_product_query.dart`: now using OFF classes for language and country instead of `String`s
* `continuous_scan_model.dart`: now using OFF classes for language and country instead of `String`s
* `keywords_product_query.dart`: now using OFF classes for language and country instead of `String`s
* `knowlegde_panel_query.dart`: now using OFF classes for country instead of `String`
* `product_cards_helper.dart`: moved here method from now defunct `AttributeListExpandable`
* `product_dialog_helper.dart`: now using OFF classes for language and country instead of `String`s
* `product_query.dart`: now computing values for OFF classes for language and country instead of `String`s
* `pubspec.yaml`: removed now useless libraries `flutter_staggered_animations`, `flutter_staggered_grid_view`, `flutter_typeahead` and `share_plus`, and upgraded some version numbers
* `scan_page.dart`: now using OFF classes for language and country instead of `String`s
* `search_page.dart`: moved methods from now defunct `ChoosePage`
* `smooth_product_card_found.dart`: removed an never used "old style" version; use a method moved to `product_dialog_helper.dart`
* `smooth_ui_library.dart`: removed the entry about now defunct `smooth_expandable_card.dart`
* `summary_card.dart`: use a method moved to `product_dialog_helper.dart`
* feat: first working stateful tab
* feat: enum instead of String
* Update tab_navigator.dart
* feat: Working camera disable for other tabs
* fix: #640 stop camera when navigating further in the stack
* doc + null safety
* fix: activating scanner when rebuilding from ground up
* Updated goldens
The navbar got removed from the images because it is now not directly added by the pages anymore
* doc:
* Minor changes
* fix: Updating product with multiple navigators
* Minor fixes
* Simplification
* Simplification
* Simplification
* Update main.dart
* Update product_list_page.dart
Co-authored-by: monsieurtanuki <fabrice_fontaine@hotmail.com>
Deleted files:
* `bulk_deletable.dart`
* `bulk_insertable.dart`
* `bulk_manager.dart`
* `dao_product_extra.dart`
* `label_sneek_peak_view.dart`
* `list_page.dart`
* `multi_product_select_page.dart`
* `product_copy_helper.dart`
* `product_copy_view.dart`
* `product_extra.dart`
* `product_list_add_button.dart`
* `product_list_button.dart`
* `product_list_item.dart`
* `product_list_item_pantry.dart`
* `product_list_item_shopping.dart`
* `product_list_preview.dart`
* `product_list_preview_helper.dart`
Impacted files:
* `abstract_dao.dart`: added hive related init methods
* `barcode_product_query.dart`: minor refactoring
* `category_product_query.dart`: minor refactoring
* `continuous_scan_model.dart`: minor refactoring
* `dao_product.dart`: rewritten from scratch with hive instead of sqflite - much easier to understand!
* `dao_product_list.dart`: rewritten from scratch with hive instead of sqflite - much easier to understand!
* `dao_string_list.dart` (renamed from `search_history.dart`): rewritten from scratch with hive instead of sqflite
* `database_product_list_supplier.dart`: minor refactoring
* `group_product_query.dart`: minor refactoring
* `history_page.dart`: minor refactoring
* `keywords_product_query.dart`: minor refactoring
* `local_database.dart`: rewritten from scratch with hive instead of sqflite; simplified
* `main.dart`: minor refactoring
* `new_product_page.dart`: minor refactoring
* `personalized_ranking_page.dart`: removed old feature
* `product_list.dart`: preferred `enum` to `String` for types; removed tons of old features
* `product_list_dialog_helper.dart`: removed old feature
* `product_list_item_simple.dart`: removed old features
* `product_list_page.dart`: removed old features
* `product_page.dart`: removed old feature
* `product_query_page_helper.dart`: cleaner code with `enum`s
* `pubspec.yaml`: added hive, removed sqflite
* `query_product_list_supplier.dart`: minor refactoring
* `search_history_view.dart`: minor refactoring
* `search_page.dart`: minor refactoring
New files:
* `fetched_product.dart`: combo of Product and its fetch status
* `smooth_product_card_error.dart`: Product Card when an exception is caught
Impacted files:
* `app_en.arb`: added translations for "internet error" and "canceled by user"
* `barcode_product_query.dart`: now using `FetchedProduct` instead of `Product`
* `choose_page.dart`: now using `FetchedProduct` instead of `Product`
* `continuous_scan_model.dart`: new value `ScannedProductState.ERROR`, used when an exception is caught during API call; now using `FetchedProduct` instead of `Product`
* `new_product_page.dart`: now using `FetchedProduct` instead of `Product`
* `product_dialog_helper.dart`: now using `FetchedProduct` instead of `Product`
* `product_page.dart`: now using `FetchedProduct` instead of `Product`
* `smooth_product_card_error.dart`: added an explicit message
* `smooth_product_carousel.dart`: handling the `ScannedProductState.ERROR` case
Also removed further "contribution" code.
Deleted files:
* `contribution_page.dart`: removed "contribution" code
* `smooth_product_card_edit.dart`: removed "contribution" code
Impacted files:
* `continuous_scan_model.dart`: refactored the "refresh"; removed "contribution" code
* `continuous_scan_page.dart`: refreshes the model after going to "ranking" page, where items can now be removed
* `home_page.dart`: removed "contribution" code
* `personalized_ranking_page.dart`: added the long click and the swipe features
* `product_list_page.dart`: refreshes after going to "ranking" page, where items can now be removed
* `scan_page.dart`: removed "contribution" code
* `smooth_product_carousel.dart`: refactored for a tricky moment where the length is not updated but deleted items are still potentially displayed; removed "contribution" code
* feature_3/#461 - added a clearable scan feature
Deleted file:
* `smoothie.svg`: replaced by identical `Icons.emoji_events_outlined`
Impacted files:
* `category_card.dart`: unrelated replacement of 'smoothie.svg'
* `continuous_scan_model.dart`: added method `clearScanSession`; refactored
* `continuous_scan_page.dart`: replaced FAB with buttons "clear" and "ranking"; added a message when empty
* `dao_product_extra.dart`: handles the new "scan session" list; added method `clearScanSession`
* `dao_product_list.dart`: refactored
* `home_page.dart`: refactored
* `product_list.dart`: introduced the new "scan session" list type and renamed the previous "scan history" list type; refactored
* `product_list_page.dart`: handles the new "scan session" list; replacement of 'smoothie.svg'
* `product_query_page.dart`: replacement of 'smoothie.svg'
* `product_query_page_helper.dart`: handles the new "scan session" list
* `scan_page.dart`: removed the "Choose/Contribute" toggle button
* `smooth_view_finder.dart`: removed label "Powered by Open Food Facts"
* Update packages/smooth_app/lib/pages/scan/continuous_scan_page.dart
Co-authored-by: Stéphane Gigandet <stephane@openfoodfacts.org>
Co-authored-by: Stéphane Gigandet <stephane@openfoodfacts.org>
Impacted files:
* `continuous_scan_model.dart`: reversing the order (= no change in display)
* `dao_product_extra.dart`: reversing the order of scanned products - the order is now from newer to older
New files:
* `abstract_dao.dart`: DAO abstraction
* `dao_product_extra.dart`: DAO for Product Extra data
Impacted files:
* `barcode_product_query.dart`: automatically storing the product in the database
* `continuous_scan_model.dart`: refactored
* `dao_product.dart`: now extends new class `AbstractDao`; moved code to new class `DaoProductExtra`; refactored; optimized bulk actions
* `dao_product_list.dart`: now extends new class `AbstractDao`; now using new class `DaoProductExtra`; removed a SQLite foreign key for performance reasons; not storing products anymore (it's done somewhere else)
* `database_product_list_supplier.dart`: refactored because of `ProductListSupplier`
* `local_database.dart`: new database version; added `DaoProductExtra`
* `main.dart`: more verbose database crash message
* `product_dialog_helper.dart`: minor refactoring
* `product_list_supplier.dart`: refactored
* `product_page.dart`: now we display the access, the scan and the refresh timestamps in the lousy temporary button
* `product_query_model.dart`: removed the code regarding storing products in the database as it's now done in the `QueryProductListSupplier`
* `product_query_page.dart`: minor refactoring
* `product_query_page_helper.dart`: refactored because of `ProductListSupplier`
* `query_product_list_supplier.dart`: automatically storing the products in the database; refactored because of `ProductListSupplier`
History and Scan lists now behave differently from the other lists.
They use "extra data": a product is in the History (or the Scan) list
if it has as an "extra data" the "last seen timestamp" (or the last scan timestamp).
Bad news: as it's a new concept in the app, we'll start from scratch for both lists.
Impacted files:
* `continuous_scan_model.dart`: new way of adding a product to scanned products; refactoring
* `continuous_scan_page.dart`: unrelated color fix
* `dao_product.dart`: added "last seen" and "last scan" as extra data, with a direct access to products that have those extra data
* `dao_product_list.dart`: history and scan lists are now handled as "different" lists, computed from the "last seen" and "last scan" extra data; refactored
* `product_list.dart`: added extra `int` data; cleaner "same product list" test
* `product_list_dialog_helper.dart`: cleaner "same product list" test
* `product_list_page.dart`: added dates to the display
* `product_page.dart`: simplified history management
* `smooth_product_card_found.dart`: added an optional `refresh` parameter, after visiting the product page
New file:
* `product_dialog_helper.dart`: Dialog helper for product barcode search
Impacted files:
* `barcode_product_query.dart`: unrelated refactoring of the use of language and country codes
* `choose_page.dart`: moved the "barcode search dialog" to new class `ProductDialogHelper`
* `continuous_scan_model.dart`: unrelated refactoring of the use of language and country codes
* `keywords_product_query.dart`: unrelated minor refactoring
* `product_page.dart`: added a "refresh product" button on the bottom bar
* `product_query.dart`: : unrelated adding of methods for the language and country codes; added translated fields
* `scan_page.dart`: unrelated refactoring of the use of language and country codes
New file:
* `scan_page.dart`: helper class to be used on top of `AlternativeContinuousScanPage` and `ContinuousScanPage`
Impacted files:
* `alternative_continuous_scan_page.dart`: `ContinuousScanModel` is now initialized upstream by `ScanPage`
* `continuous_scan_model.dart`: now a `ChangeNotifier`, uses a `ProductList` and database cache
* `continuous_scan_page.dart`: `ContinuousScanModel` is now initialized upstream by `ScanPage`
* `contribution_page.dart`: uses the new `ScanPage` widget instead of the 2 scan pages
* `local_database.dart`: removed the dummy notify listener method
* `main.dart`: uses the new `ScanPage` widget instead of the 2 scan pages
* `personalized_ranking_page.dart`: now we use a `ProductList` as input
* `product_list.dart`: added a `getProduct` method and a "scan list" identifier
* `product_page.dart`: unrelated UI fixes
* `product_query_page.dart`: slight refactoring
* `smooth_it_model.dart`: now we use `ProductList`
* `smooth_product_carousel.dart`: added the new "CACHED" product possibility; fixed an init bug
... and automagically asking the end-user if they want to see the cache
New files:
* `dao_product.dart`
* `dao_product_list.dart`
* `database_product_list_supplier.dart`
* `product_list.dart`
* `product_list_supplier.dart`
* `product_query_page_helper.dart`
* `query_product_list_supplier.dart`
Impacted files:
* `choose_page.dart`: now uses `ProductQueryPageHelper` in order to get database or http results; refactored
* `continuous_scan_model.dart`: minor refactoring due to DAO
* `group_product_query.dart`: now implements new method `getProductList`
* `keywords_product_query.dart`: now implements new method `getProductList`
* `local_database.dart`: now it's version 2; refactored using the new DAO classes
* `product_query.dart`: new method `getProductList`
* `product_query_model.dart`: now we use a `ProductListSupplier` instead of a `ProductQuery`
* `product_query_page.dart`: now we use a `ProductListSupplier` instead of a `ProductQuery`
Impacted files:
* `alternative_continuous_scan_page.dart`: refactoring mainly due to changes in `ContinuousScanModel`
* `continuous_scan_model.dart`: now we don't deal with `Widget`s, only metadata, and we use a NotifyListeners method
* `continuous_scan_page.dart`: refactoring mainly due to changes in `ContinuousScanModel`
* `contribution_page.dart`: unrelated refactoring about the use of `UserPreferences`
* `local_database.dart`: added a temporary "dummy"`NotifyListeners` method, for the sake of demonstration - to be removed
* `smooth_product_carousel.dart`: now we build the `Widget`s from metadata, and we control here the carousel
New files:
* `barcode_product_query.dart`: API query / product by barcode (used to be in `full_products_database.dart`)
* `local_database.dart`: local SQLite database with one table (`product`)
Deleted files:
* `choose_page_model.dart`: moved the code to `StatefulWidget` `ChoosePage`
* `full_product_database.dart`: database code was deprecated; API fields is now in `ProductQuery`
Impacted files:
* `alternative_continuous_scan_page.dart`: now a `StatefulWidget`; refactored with `ContinuousScanPage`
* `build.gradle`: unrelated - lowered the Android `minSdkVersion` from `24` to `19`, in order to run the app on my old smartphone ;)
* `choose_page.dart`: refactoring as changed to `StatefulWidget`
* `continuous_scan_model.dart`: not a `ChangeNotifier` anymore - should be improved when we use product list
* `continuous_scan_page.dart`: now a `StatefulWidget`
* `group_product_query.dart`: minor refactoring due to the changes in `product_query.dart`
* `keywords_product_query.dart`: minor refactoring due to the changes in `product_query.dart`
* `main.dart`: added `LocalDatabase` to the providers; simplified the code; removed mentions to `SharedPreferences`
* `product_query.dart`: refactored a bit; moved here some fields from `full_product_database.dart`
* `product_query_model.dart`: now using `LocalDatabase`
* `product_query_page.dart`: now using `LocalDatabase`; refactoring
* `pubspec.yaml`: replaced `sembast with `sqflite`
New file:
* `attribute_card.dart`: displays the svg of the score of the product for the variable
Deleted file:
* `smooth_product_card_template.dart`: replaced implicitly with `Widget`
Impacted files:
* `continuous_scan_model.dart`: refactoring around the now deleted "template"
* `smooth_product_card_edit.dart`: refactoring around the now deleted "template"
* `smooth_product_card_found.dart`: display only the preferences important attribute's svg of a product, and in the correct order
* `smooth_product_card_loading.dart`: refactoring around the now deleted "template"
* `smooth_product_card_not_found.dart`: refactoring around the now deleted "template"
* `smooth_product_card_thanks.dart`: refactoring around the now deleted "template"
* `smooth_product_carousel.dart`: refactoring around the now deleted "template"
* `user_preferences_model.dart`: new `getOrderedVariables` method