Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Upgrade the Flutter version to 3.24 #5613

Merged
merged 3 commits into from
Sep 26, 2024

Conversation

g123k
Copy link
Collaborator

@g123k g123k commented Sep 24, 2024

There are two changes in this migration:

  • Lint 4.0.0 which forces the use of super.xxx
  • onPopPage is deprecated on the Navigator

@github-actions github-actions bot added 📚 Documentation Improvements or additions to documentation 🥫 Product page 👥 User management Account login, signup, signout 🧪 Tests dependencies 🤳🥫 Scan We need to be able to scan on low-end, old devices, even with a bad camera, connexion… 🖼️ Photos - Cropping User lists Hunger Games Prices 🔁 Background tasks 🤳🥫 ZXing labels Sep 24, 2024
@g123k g123k changed the title Upgrade the Flutter version to 3.24 feat: Upgrade the Flutter version to 3.24 Sep 24, 2024
@codecov-commenter
Copy link

codecov-commenter commented Sep 24, 2024

Codecov Report

Attention: Patch coverage is 5.05051% with 94 lines in your changes missing coverage. Please review.

Project coverage is 6.89%. Comparing base (4d9c7fc) to head (59147fc).
Report is 329 commits behind head on develop.

Files with missing lines Patch % Lines
...kages/smooth_app/lib/pages/search/search_page.dart 0.00% 40 Missing ⚠️
..._app/lib/background/background_task_add_price.dart 0.00% 2 Missing ⚠️
...th_app/lib/background/background_task_barcode.dart 0.00% 2 Missing ⚠️
...mooth_app/lib/background/background_task_crop.dart 0.00% 2 Missing ⚠️
...th_app/lib/background/background_task_details.dart 0.00% 2 Missing ⚠️
.../background/background_task_download_products.dart 0.00% 2 Missing ⚠️
...p/lib/background/background_task_hunger_games.dart 0.00% 2 Missing ⚠️
...ooth_app/lib/background/background_task_image.dart 0.00% 2 Missing ⚠️
...b/background/background_task_language_refresh.dart 0.00% 2 Missing ⚠️
...ooth_app/lib/background/background_task_paged.dart 0.00% 2 Missing ⚠️
... and 27 more
Additional details and impacted files
@@            Coverage Diff             @@
##           develop   #5613      +/-   ##
==========================================
- Coverage     9.54%   6.89%   -2.66%     
==========================================
  Files          325     402      +77     
  Lines        16411   21257    +4846     
==========================================
- Hits          1567    1466     -101     
- Misses       14844   19791    +4947     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

@monsieurtanuki monsieurtanuki left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @g123k!
That new dart super syntax is a bit disturbing at first. I guess we'll get used to it.

@@ -124,12 +124,6 @@ class _SearchPageState extends State<SearchPage> {
child: searchHelper.value!.widget,
),
],
onPopPage: (Route<dynamic> route, dynamic result) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess we needed that code.
Removed that because of a new 3.24 syntax?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

onPopPage is now deprecated and the new method doesn't return a value.
So we can't do the same thing anymore.

With my tests, it seems there are no regression, but I'm not fully sure (hence the PR in draft)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wouldn't care that much about this feature being dropped.
Looking back at the code, it's when you search for a term, then search further "in the whole world" - i.e. without the country filter. Then if you go back, do you go back to the country results or the initial search input page: that's the purpose of the dropped code.
That shouldn't prevent you from merging this PR. In the worst case scenario there'll be a new issue, for a minor feature.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

By using a WillPopScope2, we can't get the same behavior.
It's fixed in the latest commit

@g123k g123k marked this pull request as ready for review September 25, 2024 14:15
@g123k g123k linked an issue Sep 25, 2024 that may be closed by this pull request
Copy link
Member

@teolemon teolemon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@g123k g123k merged commit a656986 into openfoodfacts:develop Sep 26, 2024
7 checks passed
@g123k g123k deleted the flutter_3_24 branch September 26, 2024 14:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🔁 Background tasks dependencies 📚 Documentation Improvements or additions to documentation Hunger Games 🖼️ Photos - Cropping Prices 🥫 Product page 🤳🥫 Scan We need to be able to scan on low-end, old devices, even with a bad camera, connexion… 🧪 Tests User lists 👥 User management Account login, signup, signout 🤳🥫 ZXing
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Upgrade the project to the latest Flutter version (3.24)
4 participants