Skip to content

Commit

Permalink
feat: 5079 - new deeplink to the Country Eco-Score (#5152)
Browse files Browse the repository at this point in the history
Impacted files:
* `app_en.arb`: 1 label added
* `app_fr.arb`: 1 label added
* `user_preferences_account.dart`: added a link to country eco-score on user welcome page
  • Loading branch information
monsieurtanuki authored Apr 13, 2024
1 parent 3217dfe commit 2ee3cd8
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 0 deletions.
4 changes: 4 additions & 0 deletions packages/smooth_app/lib/l10n/app_en.arb
Original file line number Diff line number Diff line change
Expand Up @@ -1686,6 +1686,10 @@
"@all_search_to_be_completed_title": {
"description": "All products to be completed: list tile title"
},
"categorize_products_country_title": "Help categorize products in your country",
"@categorize_products_country_title": {
"description": "Help categorize products in your country: list tile title"
},
"edit_product_action_retake_picture": "Retake photo",
"@edit_product_action_retake_picture": {
"description": "Product edition - FAB actions - retake a picture"
Expand Down
4 changes: 4 additions & 0 deletions packages/smooth_app/lib/l10n/app_fr.arb
Original file line number Diff line number Diff line change
Expand Up @@ -1686,6 +1686,10 @@
"@all_search_to_be_completed_title": {
"description": "All products to be completed: list tile title"
},
"categorize_products_country_title": "Aidez-nous pour les catégories des produits dans votre pays",
"@categorize_products_country_title": {
"description": "Help categorize products in your country: list tile title"
},
"edit_product_action_retake_picture": "Reprendre une photo",
"@edit_product_action_retake_picture": {
"description": "Product edition - FAB actions - retake a picture"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,13 @@ class UserPreferencesAccount extends AbstractUserPreferences {
context: context,
localDatabase: localDatabase,
),
_getListTile(
appLocalizations.categorize_products_country_title,
() async => LaunchUrlHelper.launchURL(
'https://hunger.openfoodfacts.org/eco-score?cc=${ProductQuery.getCountry().offTag}',
),
Icons.open_in_new,
),
_getListTile(
appLocalizations.view_profile,
() async => LaunchUrlHelper.launchURL(
Expand Down

0 comments on commit 2ee3cd8

Please sign in to comment.