20 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
d7a2176122 Silently fail (#6162) 2025-01-10 11:29:57 +01:00
66de046278 Remove the onboarding consent page (#6143) 2025-01-08 13:39:19 +01: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
3b88ac0709 Onboarding with main/home page from V2 (#5382) 2024-06-15 17:59:04 +02: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
30d810f87e Onboarding: new permission screen (before the consent analytics) (#2962)
Co-authored-by: Pierre Slamich <pierre@openfoodfacts.org>
2022-09-07 20:40:45 +02:00
cf4fa6aebe fix: Background image upload (#2433)
* 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>
2022-09-01 12:15:09 +02:00
b08fa964ad fix: onboarding - minor bug fix and data refresh (#2377)
Impacted files:
* `onboarding_loader.dart`: minor bug fix that prevented data cleaning after onboarding.
* `sample_product_data.json`: refreshed data from the server.
2022-06-24 15:25:21 +02:00
d5253a4fa8 fix: #2246 onboarding loading duration message (#2282)
* fix: #1946 new confirm_clear message

* fix: #2246 onboarding loading duration message

* fix: #2246 remove throw timeout exception

* fix: #2246 remove comments

* fix: #2246 remove comment

* fix: #2246 nothing happens in comment

* fix: #2246 snack bar for message

* fix presubmit

* fix: #2246 refactoring
2022-06-18 09:49:18 +02:00
9d102949e4 feat: #2081 - reinvention onboarding page (#2116)
New files:
* `birthday-cake.svg`
* `reinvention.svg`
* `reinvention-page.dart`: Onboarding page: "reinvention"

Impacted files:
* `app_en.arb`: 2 new labels for reinvention page
* `app_fr.arb`: 2 new labels for reinvention page
* `next_button.dart`: added a "transparent background" mode
* `onboarding_flow_navigator.dart`: added "reinvention" case
* `onboarding_loader.dart`: added "reinvention" case
2022-06-01 13:27:14 +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
1847d2d426 fix: moved to product onboarding references about knowledge panels (#1710)
Deleted file:
* `sample_knowledge_panels.json`: now part of `sample_product_data.json`

Impacted files:
* `knowledge_panel_page_template.dart`: now using full product instead of just knowledge panels
* `onboarding_data_product.dart`: removed knowledge panels references as they're part of product now
* `onboarding_loader.dart`removed knowledge panels references
* `sample_product_data.json`: refreshed data including knowledge panels
2022-04-30 14:33:43 +02:00
c203f3a5ec fix: #1472 Stop on boarding next button to get spammed (#1611)
* make dismissible dialogs

* make the onboarding dialog not dismissble
2022-04-22 19:20:26 +02:00
6ae6d5c833 refactor: removing a tmp code file (#1512)
Now that knowledge panels are an explicit field of product, we can simplify the code.

Deleted files:
* `onboarding_data_knowledge_panels.dart`
* `tmp.dart`

Impacted files:
* `knowledge_panels_template.dart`: now using the new `OnboardingDataProduct.forKnowledgePanels` constructor
* `onboarding_data_product.dart`: refactored in order to include knowledge panels as part of product
* `onboarding_loader.dart`: now using the new `OnboardingDataProduct` constructors
* `preferences_page.dart`: now using the new `OnboardingDataProduct.forProduct` constructor
2022-04-07 18:03:12 +02:00
852ae7be02 fix: Translate hardcoded sentences (#1473)
* Translate hardcoded sentences

* Extract all AppLocalizations.of(context) into variables
2022-04-03 18:28:11 +02:00
8232aadbca feat: Show an analytics consent UI during onboarding (#1310)
* chore(develop): release 0.2.0

* added dark theme on personalized page

* Certain Changes

* Reverted changelog changes

* wrapped the circular progress indicator with center widget

* wrapped CircularProgressIndicator with Center Widget

* Added Floating ActionButton

* Added PopUp Menu Action

* Added Pop UP Action Button

* Added Pop-Up Action Button

* Added PopUp action menu

* Added PopUp action Menu

* Added Types

* Certain Changes

* Certain Changes

* No need of Positioned Widget

* Added Consent UI

* Added Consent UI

* certain Changes

* certain changes

* certain changes

* certain Chnages

* certain Chnages

* removed hardCoded boolean value

* changes made

* Added new Strings

* png file removed

* changed color

* changes made

* comma Added

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Marvin M <39344769+M123-dev@users.noreply.github.com>
2022-03-29 15:04:19 +02: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
954449e437 feat: #935 - now we display localized (downloaded) data during onboarding (#986)
Deleted files:
* `sample_eco_knowledge_panels.json`: replaced by new file `sample_knowledge_panels.json`
* `sample_health_knowledge_panels.json`: replaced by new file `sample_knowledge_panels.json`

New files:
* `abstract_onboarding_data.dart`: Abstraction of data we download, store and reuse at onboarding.
* `dao_string.dart`: Where we store strings.
* `loading_dialog.dart`: Dialog with a stop button, while a future is running.
* `onboarding_data_knowledge_panels.dart`: Helper around knowledge panels we download, store and reuse at onboarding.
* `onboarding_data_product.dart`: Helper around a product we download, store and reuse at onboarding.
* `onboarding_loader.dart`: Helper around data we download, store and reuse at onboarding.
* `sample_knowledge_panels.json`: json data downloaded today for en_US, cf. onboarding_data_knowledge_panels.dart
* `tmp.dart`: Fixes to off-dart.

Impacted files:
* `knowledge_panel_page_template.dart`: added parameters to 1. use the database (and downloaded data) and 2. limit the display to a given panel
* `knowlegde_panel_builder.dart`: added a method to display only one panel
* `local_database.dart`: added new dao `DaoString`
* `new_product_page.dart`: refactored
* `next_button.dart`: added an optional call to async methods at "next" time - e.g. data download
* `nutrition_page_loaded.dart`: now uses the new `LoadingDialog`
* `onboarding_flow_navigator.dart`: now using the database to get more relevant (previoulsy downloaded) data
* `preferences_page.dart`: now using previously downloaded data instead of assets
* `product_dialog_helper.dart`: now uses the new `LoadingDialog`
* `question_card.dart`: unrelated minor refactoring
* `sample_eco_card_page.dart`: now using previously downloaded data instead of assets, and displaying only the environment card
* `sample_health_card_page.dart`: now using previously downloaded data instead of assets, and displaying only the health card
* `sample_product_json.dart`: json data downloaded today for en_US, cf. onboarding_data_product.dart
* `sign_up_page.dart`: now uses the new `LoadingDialog`
2022-01-20 20:28:07 +01:00