169 Commits

Author SHA1 Message Date
692610cf6f Bump to flutter_lints 6.0.0 (#6713) 2025-07-06 12:01:44 +02:00
e3bc40fdf3 chore: Migration to Dart 3.8 (#6668)
* Migration to Dart 3.8

* New GA

* Fix dartdoc
2025-06-23 18:14:17 +02:00
dda75e283e feat: Flutter 3.32 (#6665)
* Migration to Flutter 3.32

* Temporary ignore dart formatter issues
2025-06-23 09:56:00 +02:00
67539c17f3 Suggestions for countries (#6344) 2025-02-05 16:05:29 +01:00
5927e303c4 Fix onboarding safearea (#6278) 2025-01-25 10:51:01 +01:00
4e8209d4e7 feat: Same layout between country/language pickers (settings) (#6231)
* Use the same layout between the country and language picker (in the settings)

* Add missing type
2025-01-19 12:14:19 +01:00
66de046278 Remove the onboarding consent page (#6143) 2025-01-08 13:39:19 +01:00
4db7eaa9ed Minor onboarding improvements (#6126) 2025-01-06 20:21:44 +01:00
85c13502d2 Migration to Flutter 3.27 (#6076)
Co-authored-by: Pierre Slamich <pierre@openfoodfacts.org>
2024-12-29 15:20:05 +01:00
af215e8390 Change the onboarding for the AppStore + fix (#6003) 2024-12-05 10:56:02 +01:00
538e14b04b The access to Robotoff from the Product page is only via the banner (= the button is removed) (#5940) 2024-11-27 18:50:03 +01:00
c8d5392b42 fix: Optimized version of the scan cards for small screens (#5928)
* Optimized version of the scan cards for small screens

* Fix some Rive animations

* Use a slideup transition from the carousel
2024-11-25 10:42:02 +01:00
3655c3b300 feat: Scan cards share the same UI (#5866)
* Harmonized UI for scan cards

* Update packages/smooth_app/lib/l10n/app_en.arb

Co-authored-by: Pierre Slamich <pierre.slamich@gmail.com>

* Fix build issue

---------

Co-authored-by: Pierre Slamich <pierre.slamich@gmail.com>
2024-11-18 15:24:05 +01:00
054ac0d6c2 fix: Misc visual improvements (#5829)
* Visual improvements

* Center all score scards
2024-11-11 11:30:30 +01:00
104b3bf040 Adopt iOS code for Android status bar (#5784) 2024-11-05 08:51:03 +01:00
bb1c105461 Onboarding first screen: add a slight padding for devices without a transparent nav bar (#5705)
Co-authored-by: Pierre Slamich <pierre@openfoodfacts.org>
2024-10-25 19:24:55 +02:00
a4b3632067 The user was stuck in the onboarding (#5723) 2024-10-21 15:09:17 +02:00
1573d32949 feat: Country selector redesign (#5483)
* Redesign of the country selector

* CW

* Search filter

* Fix Lint warning

* Small improvements
2024-07-20 23:17:45 +02:00
1118349b00 Remove all unnecessary MediaQuery.of() (#5459) 2024-07-20 09:46:53 +02:00
d2ac037b74 Revert "chore: Revert Flutter bump to 3.22 (#5463)" (#5468)
This reverts commit 1a9091c09d0ad4addf46e85b90bc9075749ce153.
2024-07-04 15:28:58 +02:00
1a9091c09d chore: Revert Flutter bump to 3.22 (#5463)
This reverts commit 9e211ca29c5caf33c5ca7401ab92235ccb81cb27.
2024-07-04 10:33:23 +02:00
9e211ca29c chore: Bump Flutter version to 3.22 (#5458)
* Bump Flutter version to 3.22

* Migrate Material properties
2024-07-04 09:10:34 +02:00
60a898f51e chore: Remove Scan Example page from the onboarding (#5420)
* Remove Scan Example page from the onboarding

* Remove unused translation
2024-06-21 17:15:36 +02:00
a3e9bc24ec refactor: Rename tagline* to AppNews (#5377)
* Rename `tagline*` to `AppNews`

* Fix labeler path
2024-06-16 17:39:33 +02:00
3b88ac0709 Onboarding with main/home page from V2 (#5382) 2024-06-15 17:59:04 +02:00
2a08ab4114 Edge to edge mode on Android (#5378) 2024-06-15 17:21:09 +02:00
18505ddc0e fix: 5371 - less ambiguous currency symbol (#5376) 2024-06-15 12:27:43 +02:00
9e3cea3ac3 Hide Robotoff banner on the onboarding (#5369) 2024-06-14 19:26:56 +02:00
1728eff579 Replace all MediaQuery.of(context).size with MediaQuery.sizeOf(context) (#5328) 2024-06-03 17:09:37 +02:00
4db1d6c25c feat: currency symbols (#5311)
New file:
* `currency_extension.dart`: Currency symbols.

Impacted files:
* `country_selector.dart`: fixed a typo that prevented the filter from working with uppercase.
* `currency_selector.dart`: displayed the new currency full name
* `currency_selector_helper.dart`: displayed the new currency full name; fixed a typo that prevented the filter from working with uppercase.
* `price_currency_selector.dart`: displayed the new currency full name
* `smooth_text.dart`: managed the case where we search for special chars like $
2024-05-30 19:30:53 +02:00
c8b72e0036 chore: removed irrelevant dependency on package sensors_plus (#5040)
* chore: removed irrelevant dependency on package sensors_plus

* Minor refactoring
2024-05-30 14:44:34 +02:00
db223b5db5 feat: 5195 - new "add one product price" page with background task (#5292)
* feat: 5195 - new "add one product price" page with background task

New files:
* `background_task_add_price.dart`: Background task about adding a product price.
* `currency_selector_helper.dart`: Helper for currency selection.
* `price_amount_card.dart`: Card that displays the amounts (discounted or not) for price adding.
* `price_amount_field.dart`: Text field that displays a single amount for price adding.
* `price_currency_card.dart`: Card that displays the currency for price adding.
* `price_currency_selector.dart`: Button that displays the currency for price adding.
* `price_date_card.dart`: Card that displays the date for price adding.
* `price_location_card.dart`: Card that displays the location for price adding.
* `price_model.dart`: Price Model (checks and background task call) for price adding.
* `price_proof_card.dart`: Card that displays the proof for price adding.
* `product_price_add_page.dart`: Single page that displays all the elements of price adding.

Impacted files:
* `app_en.arb`: added labels related to price adding
* `app_fr.arb`: added labels related to price adding
* `background_task_crop.dart`: minor refactoring
* `background_task_image.dart`: minor refactoring
* `background_task_upload.dart`: minor refactoring
* `currency_selector.dart`: refactored with new class `CurrencySelectorHelper`
* `dao_osm_location.dart`: minor refactoring
* `image_crop_page.dart`: minor refactoring
* `location_list_supplier.dart`: minor refactoring
* `location_map_page.dart`: added action buttons for location description and location confirmation
* `operation_type.dart`: added data for new class `BackgroundTaskAddPrice`
* `prices_card.dart`: now opening new page `ProductPriceAddPage`
* `product_price_item.dart`: minor improvement
* `product_prices_page.dart`: minor improvement
* `pubspec.lock`: wtf
* `pubspec.yaml`: upgraded `openfoodfacts` to `3.10.0`
* `search_location_preloaded_item.dart`: now enabling the map page to confirm a location

* fine-tuning

Impacted files:
* `app_en.arb`: added labels related to prices
* `app_fr.arb`: added labels related to prices
* `edit_product_page.dart`: added a link to "Add product price" page
* `prices_card.dart`: refactoring
* `product_price_add_page.dart`: fixed the FAB label; refactored the access using a static method
* `product_price_item.dart`: now displaying the not discounted price; refactored
* `product_prices_list.dart`: localized
* `product_prices_page.dart`: added a FAB to "Add product price" page
2024-05-25 19:38:00 +02:00
61610ea7d5 Onboarding: the main button should be selected first by the accessibility (#5287) 2024-05-25 19:01:01 +02:00
5f7966c7f8 feat: 5201 - change currency with country when relevant (#5238)
* feat: 5201 - change currency with country when relevant

Impacted files:
* `app_en.arb`: message for a "change currency too?" dialog
* `country_selector.dart`: new method to change the currency at the same time as the country if relevant
* `product_query.dart`: init currency if null
* `pubspec.lock`: wtf
* `pubspec.yaml`: upgraded `openfoodfacts` to `3.8.0`
* `user_preferences_country_selector.dart`: asking to change the currency at the same time as the country only if confirmed or relevant
* `welcome_page.dart`: explicitly asking to change the currency at the same time as the country

* refactoring

* minor changes about labels
2024-05-11 14:38:13 +02:00
e3f01ce061 feat: 5200 - currency selector (#5236)
New files:
* `currency_selector.dart`: A selector for selecting user's currency.
* `user_preferences_currency_selector.dart`: Currency selector within user preferences.

Impacted files:
* `app_en.arb`: added 2 labels for the currency selector
* `country_selector.dart`: fixed discrepancies between selector display
* `user_preferences.dart`: new "user currency code" getter/setter
* `user_preferences_settings.dart`: added currency selector
* `welcome_page.dart`: fixed discrepancies between selector display
2024-05-10 10:34:24 +02:00
5891201fcb When the language is updated, the list of countries should also refresh itself (#5174) 2024-05-02 19:38:32 +02:00
6aa82a1495 Remove all Lottie files and use the barcode animation from the redesign (#4990) 2024-01-15 13:00:22 +01:00
bccdf1c5ce chore: Migration to Flutter 3.16 (#4917)
* Migration to Flutter 3.16

* Dart format

---------

Co-authored-by: monsieurtanuki <fabrice_fontaine@hotmail.com>
2024-01-09 12:02:00 +01:00
ecaba8ea05 fix: changing the language of countries when changing the Food App language. (#4920)
* Fix the bug related to changing the language of countries when changing the Food app language.

* changed Consumer to Selector. And deleted initState function. And changed functions name from _initFuture to _countryNamesFuture & And from _init to _loadLocalizedCountryNames.

* formated code by run [dart format .]
2023-12-28 09:24:17 +01:00
e904b05630 fix: Don't rely on removeDiacritics to highlight text (#4636)
* When we highlight a suggestion, we can't rely on the `removeDiacritics`, as it replaces some letters of 1 word into 2 or +

* Better algorithm

* Remove unused things

* Fix typo

* Unnecessary brackets

* Replace all `toLowerCase` + `removeDiacritics` by a single `getComparisonSafeString`

* Reformat CountrySelector

* `removeAccents` removed + 1 new test

---------

Co-authored-by: monsieurtanuki <fabrice_fontaine@hotmail.com>
2023-12-16 12:08:01 +01:00
d3c25f26c9 Customized language picker for the onboarding (#4826) 2023-11-21 14:45:02 +01:00
346c6e30c4 fix: 1815 - around context.mounted (#4768)
* fix: 1815 - around context.mounted

The PR is about two related topics:
* Removing all the `ignore: use_build_context_synchronously`
* Replacing all the `State<StatefulWidget> widget` by `BuildContext context`, now that it's possible in flutter

* Update packages/smooth_app/lib/pages/onboarding/permissions_page.dart

* format fix
2023-11-15 11:50:00 +01:00
e463ca37a8 feat: 4628 - refactoring as preparatory work (#4641)
* feat: 4628 - refactoring

Deleted files:
* `knowledge_panel_element_card.dart`
* `knowledge_panel_summary_card.dart`

New files:
* `knowledge_panel_image_card.dart`: Card that displays a Knowledge Panel _Image_ element.
* `knowledge_panel_text_card.dart`: Card that displays a Knowledge Panel _Text_ element.
* `website_card.dart`: Card that displays a website link. Code used to be inside `new_product_page.dart`

Impacted files:
* `knowledge_panel_card.dart`: minor refactoring
* `knowledge_panel_expanded_card.dart`: minor refactoring
* `knowledge_panel_page.dart`: minor refactoring
* `knowledge_panel_page_template.dart`: minor refactoring
* `knowledge_panels_builder.dart`: moved code here from `knowledge_panel_element_card.dart` and `knowledge_panel_summary_card.dart`; minor refactoring
* `new_product_page.dart`: moved the `WebsiteCard` code to a dedicated file; minor refactoring
* `product_cards_helper.dart`: minor refactoring
* `summary_card.dart`: minor refactoring

* feat: 4628 - additional TODO's
2023-10-28 07:32:03 +02:00
c31e4582a4 chore: Migration to Flutter 3.13 (#4579)
Co-authored-by: monsieurtanuki <fabrice_fontaine@hotmail.com>
2023-09-30 19:39:12 +02:00
05d0490080 feat: 4513 - user preferences pages simple refactoring (#4620)
New files:
* `user_preferences_advanced_settings.dart`: used to be `_AdvancedSettings` in `user_preferences_settings.dart`
* `user_preferences_camera_sound.dart`: used to be `_CameraPlayScanSoundSetting` in `user_preferences_settings.dart`
* `user_preferences_choose_accent_color.dart`: used to be `_ChooseAccentColor` in `user_preferences_settings.dart`
* `user_preferences_choose_app_theme.dart`: used to be more or less `_ChooseAppTheme` in `user_preferences_settings.dart`
* `user_preferences_choose_text_color_contrast.dart`: used to be `_ChooseTextColorContrast` in `user_preferences_settings.dart`
* `user_preferences_country_selector.dart`: used to be coded in `user_preferences_settings.dart`
* `user_preferences_crash_reporting.dart`: used to be `_CrashReportingSetting` in `user_preferences_settings.dart`
* `user_preferences_haptic_feedback.dart`: used to be `_HapticFeedbackSetting` in `user_preferences_settings.dart`
* `user_preferences_image_source.dart`: used to be coded in `user_preferences_settings.dart`
* `user_preferences_language_selector.dart`: used to be coded in `user_preferences_settings.dart`
* `user_preferences_rate_us.dart`: used to be `_RateUs` in `user_preferences_settings.dart`
* `user_preferences_send_anonymous.dart`: used to be `_SendAnonymousDataSetting` in `user_preferences_settings.dart`
* `user_preferences_share_with_friends.dart`: used to be `_ShareWithFriends` in `user_preferences_settings.dart`

Impacted files:
* `abstract_user_preferences.dart`: minor refactoring
* `preferences_page.dart`: minor refactoring
* `user_preferences.dart`: minor refactoring
* `user_preferences_account.dart`: removed `UserPreferencesSection` and `_UserPreferencesAccountSubTitleSignOut` for simplification
* `user_preferences_attribute_group.dart`: refactored as not `AbstractUserPreferences`
* `user_preferences_connect.dart`: minor refactoring
* `user_preferences_contribute.dart`: minor refactoring
* `user_preferences_dev_mode.dart`: minor refactoring
* `user_preferences_faq.dart`: minor refactoring
* `user_preferences_food.dart`: minor refactoring
* `user_preferences_page.dart`: minor refactoring
* `user_preferences_settings.dart`: file was too big - moved code to new files+classes
2023-09-12 19:25:29 +02:00
b530a37015 fix: Added a close button to the tooltip in Onboarding (#4619)
* fix: Added a close button to the tooltip in Onboarding

* fix: Added a close button to the tooltip in Onboarding

* fix: Added a close button to the tooltip in Onboarding

* fix: Added a close button to the tooltip in Onboarding

* fix: Added a close button to the tooltip in Onboarding

* Update packages/smooth_app/lib/pages/onboarding/knowledge_panel_page_template.dart

* Update packages/smooth_app/lib/pages/onboarding/knowledge_panel_page_template.dart

---------

Co-authored-by: monsieurtanuki <fabrice_fontaine@hotmail.com>
2023-09-06 14:36:53 +02:00
c71e0b9eb1 fix: 4606 - translucent top status bar on on-boarding page 1 (#4615)
Impacted file:
* `reinvention_page.dart`: put the color (container) and THEN the SafeArea
2023-09-02 16:08:36 +02:00
1bae5a78ac Dropdown outline visible (#4609) 2023-08-31 19:18:24 +02:00
d8042224f3 fix: 4575 - country is now always populated (#4591)
* fix: 4575 - country is now always populated

* Update packages/smooth_app/lib/query/product_query.dart

* fix: 4575 - reformatted
2023-08-26 17:11:53 +02:00
78884a6ad2 feat: App review in the "scan card" (#4450)
* 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 🤨
2023-08-05 17:27:59 +02:00