27 Commits

Author SHA1 Message Date
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
db036a4c4f fix: New UI for the food preferences (#6466)
Co-authored-by: chetanr25 <1ds22ai010@dsce.edu.com>
Co-authored-by: Edouard Marquez <g123k@users.noreply.github.com>
Co-authored-by: Edouard Marquez <animatrix30@gmail.com>
2025-05-16 10:46:29 +02:00
1728eff579 Replace all MediaQuery.of(context).size with MediaQuery.sizeOf(context) (#5328) 2024-06-03 17:09:37 +02:00
8d0ae6a72d Onboarding: scrollbars everywhere + expanded card (#4342) 2023-07-29 19:26:55 +02:00
ad7ac7732a refactor: Flutter v3.7.0 (#3642) 2023-01-31 22:39:07 +01:00
7e861f569e refactor: upgrade to off-dart 2.0.0 (#3495)
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';`
2023-01-02 16:10:52 +01:00
b08dc608fe feat: #2671 - product lists - downloads products when not in local database (#2673)
* product lists - downloads products when not in local database
* added "refresh product" button on "error card"

Impacted files:
* `attribute_button.dart`: unrelated minor refactoring
* `design_constants.dart`: unrelated minor refactoring
* `onboarding_bottom_bar.dart`: unrelated minor refactoring
* `product_list_item_simple.dart`: added a "refresh product" button on "error card"; different card for "loading" and "downloading"; refactored
* `product_model.dart`: now we try to download the product if for some unexpected reason it's not in the local database; added a callable `download` method
* `smooth_product_card_template.dart`: added parameters `barcode` and `error` for more flexibility; added optional "action button"; refactored
2022-08-01 08:44:05 +02:00
2841a52c62 feat: #2072 - removed dialog from food preferences radio buttons (#2075)
Impacted file:
* `attribute_button.dart`
2022-05-30 21:37:50 +02:00
818cd13979 feat: Harmonize app dialogs (#1978)
* Harmonize app dialogs

* Flat/text button for negative & neutral states
+ fix a missing image

* Remove unused SmoothActionButton implementation

* Fix build issues
2022-05-25 12:43:12 +02:00
f44c19caa5 Fix onboarding food preferences overflow (#1853) 2022-05-19 19:06:21 +02:00
c3b44aced2 fix: Flutter 3.0 fixes (#1814)
* fix: Flutter 3.0 fixes

* Workflows

* Update gradle

* Automated fixes

* Manual async gap fixes

* Fix merge conflict reverts

* Format

* qr_code_scanner fixes
2022-05-12 16:07:22 +02:00
74ab981c83 fix: A clear alert message after changing preference. (#1783)
* fix: A clear and logical alert message

* passed arguments to arb file

* modified description text
2022-05-11 21:12:42 +02:00
b6e253a2db feat: #960 - 2 lines (instead of 1) for "importance", and radio button on top (#1760)
Impacted files:
* `attribute_button.dart`: 2 lines (instead of 1) for "importance", radio button on top, smaller title style, info on the right, minimum target size
* `user_preferences_page-blue-dark.png`: golden refresh
* `user_preferences_page-blue-light.png`: golden refresh
* `user_preferences_page-brown-dark.png`: golden refresh
* `user_preferences_page-brown-light.png`: golden refresh
* `user_preferences_page-green-dark.png`: golden refresh
* `user_preferences_page-green-light.png`: golden refresh
2022-05-06 11:14:43 +02:00
21253c15db feat: #960 - changed the attribute/importance preference display. (#1590)
Impacted files:
* `attribute_button.dart`: changed the whole display.
* `design_constants.dart`: added constants for the default icon size and the minimum target size (according to goldens).
* `product_preferences.dart`: added the downgrading of "very important" to "important".
* `pubspec.lock`: wtf
* `user_preferences_page-blue-dark.png`: impacted by new display.
* `user_preferences_page-blue-light.png`: impacted by new display.
* `user_preferences_page-brown-dark.png`: impacted by new display.
* `user_preferences_page-brown-light.png`: impacted by new display.
* `user_preferences_page-green-dark.png`: impacted by new display.
* `user_preferences_page-green-light.png`: impacted by new display.
2022-05-04 17:00:30 +02:00
721a49b259 fix: Fix food preferences buttons goes into two lines (#1445) 2022-04-02 12:00:37 +02:00
9ef1c48aa0 fix: Added Fitted Box for food preferences text shrinking (#1412)
* Added hero animation to the product summary card

* formatted the code

* Fitted Box added

* Update AttributeButton

* formatted

* formatted
2022-03-30 15:48:58 +02:00
060dbc2ef2 fix: #890 - use setting name as attribute (#1383) 2022-03-29 15:11:45 +02:00
860709d534 feat: #1349 - now we get the default importances from the reference itself (#1358)
Impacted files:
* `attribute_button.dart`: now the downgrade from "very important" to "important" is done from the preference manager itself
* `init_attribute_groups_en.json`: minor change due to data refresh
* `product_preferences.dart`: now we get the default importances from the reference itself; now we downgrade here "very important" to "important"
* `smooth_matched_product.dart`: minor refactoring
* `user_preferences.dart`: minor refactoring
2022-03-28 17:53:54 +02:00
e7df9e53e6 fix: Colors of generic widgets replaced with globalized constants for colors (#1268)
* new colors added

* colors replaced with constants

* colors replaced with constants

* colors replaced with constants

* colors moved to design_constants.dart

* empty attribute helper deleted

* imports updated

* screenshots updated

Co-authored-by: Gayangi Seneviratne <sgayangi@gmail.com>
2022-03-20 16:47:25 +01:00
0d61134375 General radius throughout the app (#1179)
* Added design const

* ROUNDED_RADIUS

* General radius throughout the app

* Update smooth_main_button.dart

* .all instead of .circular
2022-03-03 21:25:46 +01:00
e874bbeea0 refactor: Package merge (#981) 2022-01-26 16:50:13 +01:00
f1045c4cac feat: #870 - new UI for attribute buttons and user preference titles (#871)
Deleted files:
* `attribute_dialog.dart`
* `important.svg`
* `mandatory.svg`

Impacted files:
* `abstract_user_preferences.dart`: aligns the title of the header with the expand/collapse icon, and with a compact mode
* `attribute_button.dart`: removed the attribute dialog and put a button instead
* `attribute_helper.dart`: removed was not relevant anymore, and there's not much left!
* `user_preferences_attribute_group.dart`: different text style and compact title, no more reordering
* `user_preferences_page-blue-dark.png`: golden refresh
* `user_preferences_page-blue-light.png`: golden refresh
* `user_preferences_page-brown-dark.png`: golden refresh
* `user_preferences_page-brown-light.png`: golden refresh
* `user_preferences_page-green-dark.png`: golden refresh
* `user_preferences_page-green-light.png`: golden refresh
2022-01-07 16:05:13 +01:00
0ee7fb970a fix: #763 - safer use of a distinct widget for attribute importance dialog (#778)
New files:
* `attribute_dialog.dart`: Vertical list of radio buttons used to set the importance of an attribute.
* `attribute_helper.dart`: Common values and methods for attribute display

Impacted files:
* `attribute_button.dart`: refactored by moving code to new files `attribute_dialog.dart` and `attribute_helper.dart`
* `user_preferences_page.dart`: minor refactoring
2021-12-28 08:05:19 +01:00
69bdefbaab feat: #671 - removed the "very important" attribute importance (#672)
Deleted file:
* `very_important.svg`

Impacted files:
* `attribute_button.dart`: removed "very important" as a possibility and downgraded it to "important"
* `mandatory.svg`: used to be "!!!", now just "!!" is enough
* `product_compatibility_helper.dart`: downgraded the "very important" weight to the "important" weight value
* `product_preferences.dart`: the default attributes are now reset to "important" (instead of "very important")
2021-11-18 18:35:36 +01:00
df172d3615 Fix lint warnings (#587)
This fixes a number of lint warnings by removing redundant imports.
No changes in functionality or logic, just removing redundant imports.

Bumped up the analysis checks by making infos and warnings fatal.
2021-09-24 11:43:25 -07:00
46d69367fe File structure cleanup (#477)
* file arrangement cleanup

* local variable name

* private constructor
2021-08-06 17:56:34 +02:00