* Support custom domain + env for the TagLine
* Update packages/smooth_app/lib/data_models/tagline/tagline_provider.dart
---------
Co-authored-by: Pierre Slamich <pierre.slamich@gmail.com>
Impacted files:
* `analytics_helper.dart`: new getter `_anonymousVisitorId`; refactoring
* `main.dart`: minor refactoring
* `user_preferences.dart`: new method `getUniqueRandom()` that is used to compute and store the first letter of the anonymous visitor ID.
* feat: 4423 - specific "Not connected to internet" displayed error
Impacted files:
* `barcode_product_query.dart`: removed useless `try` as already `catch`'ed
* `continuous_scan_model.dart`: removed the `codeInvalid` case that could never happen
* `fetched_product.dart`: refactored with explicit constructors and additional exception and connectivity fields; removed the `codeInvalid` case that could never happen
* `new_product_page.dart`: minor refactoring
* `product_dialog_helper.dart`: removed the `codeInvalid` case that could never happen; minor refactoting
* `product_list_item_simple.dart`: removed the `codeInvalid` case that could never happen
* `product_loader_page.dart`: removed useless `try` as already `catch`'ed
* `product_refresher.dart`: added a specific "You're not connected to the internet" error message; refactored using more `FetchedProduct`; removed useless method
* `pubspec.lock`: wtf
* `pubspec.yaml`: added package `connectivity_plus`
* `question_card.dart`: refactored using `FetchedProduct`
* feat: 4423 - fixed pubspec.yaml
* feat: 4423 - new "server down" message after a ping attempt
Impacted files:
* `fetched_product.dart`: added field `failedPingedHost` where we store the host that we couldn't ping
* `generated_plugin_registrant.cc`: wtf
* `generated_plugins.cmake`: wtf
* `GeneratedPluginRegistrant.swift`: wtf
* `main.dart`: registered `DartPingIOS`
* `product_refresher.dart`: now trying to ping the server if exception and connection
* `pubspec.lock`: wtf
* `pubspec.yaml: added packages `dart_ping` and `dart_ping_ios`
* feat: 4423 - stupid lint check part 1
* feat: 4423 - stupid lint check part 2
* feat: 4423 - stupid lint check part 3
* feat: 4423 - stupid lint check part 5
* feat: 4423 - localizations
Impacted files:
* `app_en.arb`: 4 new labels when we couldn't retrieve a product (not found, no internet, server down, server error)
* `product_refresher.dart`: used the new labels
* App review in the "scan card"
* Add a keep alive to prevent many requests
* Add a missing call to super (for the KeepAlive mixin)
* Don't really understand what happened with this file 🤨
* Migration to Flutter 3.10
* Bump Flutter version on actions
* GitHub Actions: use channel instead of a fixed version of Flutter
* Add a missing argument due to the upgrade to Flutter 3.10
* Regenerate goldens
---------
Co-authored-by: monsieurtanuki <fabrice_fontaine@hotmail.com>
* Support for deep links on Android
* Deep links: Better support for network errors / unknown product
* iOS configuration for deep links
* Improve documentation
* Improve doc
* Support other domains
* Add an error page
* Upgrade to go_router 7.0.2
* Add some Sentry events
* Update packages/smooth_app/lib/helpers/extension_on_text_helper.dart
Co-authored-by: monsieurtanuki <fabrice_fontaine@hotmail.com>
* SizedBox -> EMPTY_WIDGET
* PreferencePageType: from name to tag
* Remove an unused async keyword
* Move internal app routes to an enum
* Add a clarification about `ProductLoaderPage`
* Update packages/smooth_app/lib/pages/navigator/app_navigator.dart
Co-authored-by: Pierre Slamich <pierre.slamich@gmail.com>
* Revert how we open the product addition/creation on the product not found card
---------
Co-authored-by: monsieurtanuki <fabrice_fontaine@hotmail.com>
Co-authored-by: Pierre Slamich <pierre.slamich@gmail.com>
Impacted files:
* `consent_analytics_page.dart`: minor refactoring
* `country_selector.dart`: now using the preferences for initial country code; same UI as language selector
* `main.dart`: minor refactoring
* `next_button.dart`: minor refactoring
* `onboarding_flow_navigator.dart`: refactoring around `OnboardingPage`
* `permissions_page.dart`: minor refactoring
* `product_query.dart`: minor refactoring
* `user_preferences.dart`: minor refactoring
* `user_preferences_dev_mode.dart`: minor refactoring
* `user_preferences_page.dart`: minor UI fix (app bar title on 2 lines)
* `user_preferences_settings.dart`: added the "selected language" parameter; minor refactoring
* `welcome_page.dart`: fixed a visual overflow bug
* feat/3712 - new mlkit and zxing scanners on flutter 3.7
New files:
* `smooth_barcode_scanner_mlkit.dart`: Barcode scanner based on MLKit.
* `smooth_barcode_scanner_mockup.dart`: Fake barcode scanner, for tests.
* `smooth_barcode_scanner_type.dart`: Barcode scanner types.
* `smooth_barcode_scanner_zxing.dart`: Barcode scanner based on ZXing.
Deleted files:
* `scanner`: removed folder
* `camera_controller.dart`
* `camera_image_cropper.dart`
* `camera_full_getter.dart`
* `camera_image_preview.dart`
* `camera_modes.dart`
* `lifecycle_aware_widget.dart`
* `lifecycle_manager.dart`
* `scan_flash_toggle.dart`
* `scan_visor.dart`
* `scanner_overlay.dart`
* `user_preferences_dialog_editor.dart`
Impacted files:
* `app_test.dart`: now uses new enum `SmoothBarcodeScannerType`
* `background_task_badge.dart`: now uses flutter 3.7 badge
* `basic_test.dart`: now uses new enum `SmoothBarcodeScannerType`
* `build.gradle`: upgraded kotlin to 1.8.0
* `camera_helper.dart`: simplified
* `camera_scan_page.dart`: simplified
* `constant_icons.dart`: added an adaptive "flip camera" icon
* `file_cache_manager_impl.dart`: minor 3.7 refactoring
* `goldens.dart`: minor 3.7 refactoring
* `labeler.yml`: removed references to delete files
* `main_fdroid.dart`: now uses new enum `SmoothBarcodeScannerType`
* `main_google_play.dart`: now uses new enum `SmoothBarcodeScannerType`
* `main_ios.dart`: now uses new enum `SmoothBarcodeScannerType`
* `network_config.dart`: minor 3.7 refactoring
* `new_product_page.dart`: minor 3.7 refactoring
* `onboarding_bottom_bar.dart`: minor 3.7 refactoring
* `pubspec.lock`: wtf
* `apple_app_store/pubspec.yaml`: minor 3.7 refactoring
* `google_play/pubspec.yaml`: minor 3.7 refactoring
* `shared/pubspec.yaml`: minor 3.7 refactoring
* `uri_store/pubspec.yaml`: minor 3.7 refactoring
* `data_importer/pubspec.yaml`: minor 3.7 refactoring
* `data_importer_shared/pubspec.yaml`: minor 3.7 refactoring
* `smooth_app/pubspec.yaml`: now includes mlkit and zxing scanners; minor 3.7 refactoring; removed now redundant `badge`; minor upgrades
* `scan_page.dart`: simplified
* `user_preferences.dart`: removed now useless methods
* `user_preferences_dev_mode.dart`: removed duration and scan parameter settings
* `user_preferences_settings.dart`: removed now useless parameter; minor 3.7 refactoring
* feat/3712 - new "no camera found" message
Impacted file:
* `camera_scan_page.dart`: new "no camera found" message
* fix github actions flutter version
* feat/3712 - localized "no camera found" message
Impacted files:
* `app_en.arb`: new label for "no camera found"
* `app_fr.arb`: new label for "no camera found"
* `camera_scan_page.dart`: localized "no camera found" message
---------
Co-authored-by: Marvin M <39344769+M123-dev@users.noreply.github.com>
* ignored some generated files
* init amoled mode
* color scheme
* test updated for amoled
* added accent color picker
* localized accent color picker
* added color provider
* Dark Mode changed to Theme mode
* Map key iteration only
* Update packages/smooth_app/lib/l10n/app_en.arb
Co-authored-by: Aman Raj <57723319+AshAman999@users.noreply.github.com>
* removed external dep
* updated golden test
* added comments
* using shade fun
* color scheme localization
* color scheme localization
* added textContrast
* color contrast app settings
* merged upstream
* typo fix
* added color to DropDownMenuItems
* SnackBar text, contrast level
* text contrast change to pass WCAG2.1
* snackBar Color Change
---------
Co-authored-by: Aman Raj <57723319+AshAman999@users.noreply.github.com>
* chore: Warning when running out of main.dart
We got some questions on slack from people who had problems running the app:
root isolate couldn't be started
Which happens when you try to run the app from main.dart
* debug print
* Update pubspec.lock
* fix: 3533 - added a "stamp" to background tasks, to identify similar tasks
Impacted files:
* `abstract_background_task.dart`: added a stamp; minor refactoring
* `add_basic_details_page.dart`: implemented the background stamp
* `add_other_details_page.dart`: implemented the background stamp
* `background_task_details.dart`: new `enum BackgroundTaskDetailsStamp`; added the background stamp
* `background_task_image.dart`: added the background stamp
* `background_task_manager.dart`: refactored the run queue; stops when there's not internet connection
* `background_task_refresh_later.dart`: added the background stamp
* `edit_ingredients_page.dart`: added the background stamp
* `edit_new_packagings.dart`: implemented the background stamp
* `local_database.dart`: unrelated removal of deprecated comment
* `main.dart`: slightly related fix of #3522, because we used to run background tasks before the language was set
* `nutrition_page_loaded.dart`: implemented the background stamp
* `ocr_helper.dart`: added a background stamp
* `ocr_ingredients_helper.dart`: implemented the background stamp
* `ocr_packaging_helper.dart`: implemented the background stamp
* `simple_input_page.dart`: added the background stamp; now we split the updates in as many minimum parts as possible
* `simple_input_page_helpers.dart`: added and implemented background stamps; unrelated fix (when the widget is not displayed, the data should be considered as "not changed")
* fix: 3533 - added a 5 second delay between runs
Impacted files:
* `background_task_details.dart`: more verbose tags for stamps
* `background_task_image.dart`: added language to stamp
* `background_task_manager.dart`: added a 5 second minimum delay between runs; added temporary debug prints
* `edit_product_page.dart`: added a task refresh
* `product_image_gallery_view.dart`: added a task refresh
Impacted files:
* `paged_to_be_completed_product_query.dart`: renamed `State` as `ProductState`
* `paged_user_product_query.dart`: created local `UserSearchType` instead of deprecated off-dart `UserProductSearchType`; used `ProductSearchQueryConfiguration` instead of deprecated `UserProductSearchQueryConfiguration`
* `product_query.dart`: now that we use fully v3, we don't need the temporary field list for user-related queries with v2
* `pubspec.lock`: wtf
* `pubspec.yaml`: upgrade to off-dart 2.0.0
* `user_preferences_account.dart`: now using new local class `UserSearchType`
* and reduced all off-dart imports to a single `import 'package:openfoodfacts/openfoodfacts.dart';`
* Implementations for Apple App Store/Google Play/Uri based store
* App Store as a service
* In app review asked after being logged in for the first time
* Don't forget to use the new path for MLKit script
* Remove a warning about the context
* Fix tests not passing
* Update packages/app/lib/entrypoints/android/main_samsung_gallery.dart
Co-authored-by: Marvin M <39344769+M123-dev@users.noreply.github.com>
* Update packages/smooth_app/pubspec.yaml
Co-authored-by: Pierre Slamich <pierre.slamich@gmail.com>
Co-authored-by: Marvin M <39344769+M123-dev@users.noreply.github.com>
Co-authored-by: Pierre Slamich <pierre@openfoodfacts.org>
Deleted file:
* `background_task_helper.dart`
New files:
* `background_task_manager.dart`: Management of background tasks: single thread, block, restart, display.
* `dao_instant_string.dart`: Where we store strings that need INSTANT access (= not lazy, no await).
Impacted fles:
* `abstract_background_task.dart`: refactored
* `background_task_details.dart`: refactored around the changes in `AbstractBackgroundTask`
* `background_task_image.dart`: refactored around the changes in `AbstractBackgroundTask`
* `dao_string_list.dart`: refactoring around now managing several lists; removed unnecessary `await` for a non-lazy dao
* `local_database.dart`: added the new class `DaoInstantString`; relaunch the background task manager at every refresh
* `main.dart`: minor refactoring
* `new_crop_page.dart`: unrelated bug fix
* `offline_tasks_page.dart`: refactored around the new `BackgroundTaskManager`
* `operation_type.dart`: added helper methods
* `product_image_gallery_view.dart`: minor refactoring
* `product_image_viewer.dart`: unrelated bug fix - the product was not refreshed, and so wasn't the image even after a successful download
* `pubspec.lock`: wtf
* `pubspec.yaml`: removed `flutter_task_manager`
* `search_history_view.dart`: minor refactoring now that we have several lists in `DaoStringList`
* `search_page.dart`: minor refactoring now that we have several lists in `DaoStringList`
* `up_to_date_changes.dart`: minor refactoring
* `up_to_date_product_provider.dart`: minor refactoring
* MLKit as a dependency
* Fix tests
* Add IntelliJ/Android build configurations
* IJ config: Rename folders
* Dynamically add the right dependency on app/pubspec.yaml
(cherry picked from commit 15b5243cab764d40e303ac9db9f3eda0b7caec03)
* Ad all VSCode configs
* Enable MLKit dependency for GitHub actions
* Make smooth_app a module (also called step 1)
Android impl is OK.
Still have to check for iOS and tests
* Fix scan sound not working
* Fix ci/pub_upgrade.sh issues
* Fix tests
* Some doc
* Fix build actions
* Fix iOS build
* Fix warnings
* Fix Flutter analyze
* Fix typo
* The CI needs at least one test
Co-authored-by: Marvin Möltgen <39344769+M123-dev@users.noreply.github.com>
* work manager used for bg schedule
* removed swith case
* remove unwanted contrains and randomize the taskid
as image.others might fail
* added translations
* new product image upload working
* removed debug for work manager
* delete photo when uploaded
* use await keywords while initializing
* refactor the code
* fix show image after queed
* serialize and deserialze input data seperately
* add an instant product in the loacl db to
let the user not confuse
* added smooth random class
* use smooth random to generate 8 digits
* remove unneccesary await
* update the local db with a product if not yet
uploaded
* update local databse after sucessful
update into server
* don't refresh automatically after upload queed
* supply language code to work manager
* import app localizations
* small refactoring
* refactor the code for work manager
* iOS Config for WorkManager
* formatting
* suggestion by tolemon
Co-authored-by: Pierre Slamich <pierre.slamich@gmail.com>
* suggestion by tolemon
Co-authored-by: Pierre Slamich <pierre.slamich@gmail.com>
* suggestion by tolemon
Co-authored-by: Pierre Slamich <pierre.slamich@gmail.com>
* small fix
* add swith case to the workmanager
* efficient switch case
* Update packages/smooth_app/lib/l10n/app_en.arb
Suggested by tolemon
Co-authored-by: Pierre Slamich <pierre.slamich@gmail.com>
* minor fix
* Basic Input details add are now run in background
* basic details are now updated immediatly
even without internet
* nutrient edit task are now background
and also conflict when recheduling task is managed
* menu screen for background tasks and
nutrition edits are now backgrounded
* button for retry now works in the bg tasks screen
* formatting
* genaralised function for non image tasks
* should retry set default to false
* better mechanism for retries and refactor
* refactor and consts duration of 3s for snackbars
* now language country and user are properly dropped
* Update packages/smooth_app/ios/Runner/Info.plist
* Update packages/smooth_app/ios/Runner/AppDelegate.swift
* Error messages fixed
* custom workmanager dependencies added
* migrated basic detail task from work manager to
taskmanager
* chanages to do the product edit changes in bg
* dart format
* cleaned the function calls when doing bg task
* dao_task edited
* unnecessary methods removed
* use int as id instead of string
* added comments and made fields final
* used const variable instead of hardcoded ones
* get pending tasks from taskManager class
* refactor
* handled exceptions
* string instead of int
* remove unused plugin
* removed unnessary files
* update to localdatabase working without islotes
* suggestions left as comments on PR
* deleted unncessary Random class
* doc added
* Remove WorkManager iOS code
* reset publock
* reset publock
* remove harcoded color
* used duration constant class instead of harcoded
* make methods to generate taskId
* dart frmt
* changes as per the code review
* string buffer , var documentation and rename
* error fix
* refactor and spelling corrections
* /// instead of //
* dart ff formater
* more refactorings
* Update background_task_helper.dart
* dart ff fix
Co-authored-by: monsieurtanuki <fabrice_fontaine@hotmail.com>
Co-authored-by: Edouard Marquez <g123k@users.noreply.github.com>
Co-authored-by: Pierre Slamich <pierre.slamich@gmail.com>
Co-authored-by: Pierre Slamich <pierre@openfoodfacts.org>