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: Use the Slivers mechanism with the Gallery view #4913

Merged
merged 5 commits into from
Dec 16, 2023

Conversation

g123k
Copy link
Collaborator

@g123k g123k commented Dec 16, 2023

Hi everyone,

As explained in #4912, the Box mechanism in Flutter ensures that ALL Widgets are built, even if they are not visible by the user. For that, we have Slivers and their lazy loading capacity.

This PR moves the code to Slivers and also simplifies it by not relying on rows of 2 items.

A demo:

Untitled.mov

@codecov-commenter
Copy link

Codecov Report

Attention: 119 lines in your changes are missing coverage. Please review.

Comparison is base (fe7e1f8) 9.67% compared to head (273b2d8) 9.66%.

Files Patch % Lines
.../lib/pages/product/product_image_gallery_view.dart 0.00% 70 Missing ⚠️
packages/smooth_app/lib/widgets/slivers.dart 0.00% 25 Missing ⚠️
.../pages/image/product_image_gallery_other_view.dart 0.00% 21 Missing ⚠️
...p/lib/generic_lib/widgets/images/smooth_image.dart 0.00% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           develop   #4913      +/-   ##
==========================================
- Coverage     9.67%   9.66%   -0.01%     
==========================================
  Files          318     319       +1     
  Lines        16115   16125      +10     
==========================================
  Hits          1559    1559              
- Misses       14556   14566      +10     

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

@teolemon teolemon merged commit f81ba98 into openfoodfacts:develop Dec 16, 2023
@teolemon
Copy link
Member

thanks @g123k and @monsieurtanuki 👍

@g123k g123k deleted the gallery_with_slivers branch December 30, 2024 10:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

"Interesting photos" loads ALL photos 😱
4 participants