-
-
Notifications
You must be signed in to change notification settings - Fork 280
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: Product not found dialog - a fully responsive implementation #4315
Conversation
Codecov Report
@@ Coverage Diff @@
## develop #4315 +/- ##
===========================================
+ Coverage 10.45% 10.47% +0.01%
===========================================
Files 291 291
Lines 14416 14431 +15
===========================================
+ Hits 1507 1511 +4
- Misses 12909 12920 +11
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
You can test this PR on: https://app.waldo.com/applications/app-19d476740ba1bb36/sessions |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@g123k I do believe we would be better off
- with the previous code
- without the
LayoutBuilder
- with the svg width computed as
MediaQuery.of(context).size.width / 4
, as it's the only place where we use the layout constraints
Therefore, less complexity in the code.
Actually, it's basically your code without a LayoutBuilder. |
That's what I don't get: I suppose that a |
The main difference is that our implementation works, but depends on lots of The idea is my change prevents the use of AutosizeText, with more or less the same rendering at the end. |
let's improve on that later, the modal is at least displayed now. |
Hi everyone,
In Dialogs, using
LayoutBuilder
,AutoSizeText
and in some casesExpanded
, can break on some devices.Most of the time, it's OK on real devices, but not on emulators (don't ask me why, that's what I've found on the Flutter github 🤷♂️).
I've rewritten the dialog to remain responsive without a
LayoutBuilder
.The drawback is that it requires some manual computation.
As always, a video to show how responsive it is:
https://github.com/openfoodfacts/smooth-app/assets/246838/b918e942-42e9-4840-90f8-9057c36565c6
It will fix #4313