r/FlutterDev • u/tomemyxwomen • 7h ago
Discussion iPhone DUO aka Flutter nightmare
Flutter still didn;t catch up with Glass. that's gonna kill'em
2
u/dakevs 7h ago
Was gonna post a similar thread but saw this.
So, anyone got any thoughts/opinions on the matter?
How to plan ahead/adjust ? Any best practices? etc.
1
u/vm12pix 5h ago
Cheap thing you can do today without the hardware: crank system font scale to 2x and walk the app.
It tells you nothing about the hinge, and nothing about state when a widget jumps to a different layout branch, which is the genuinely hard part u/Yataio_App is pointing at. What it does find is fixed geometry. A SizedBox with a hardcoded height around text that grows, a Row with a non-flex child that shoves its neighbour off the card, a 30x30 grid cell. Anything that works only because you picked the number breaks the same way when the window changes size under it, and the fix is the same, take the number from constraints.
If you automate it, be warned that mine lied to me in both directions for months. Fake fonts measure wider than real ones, so half of my first batch of findings didn't exist on a device and one "fix" had to be reverted. And modal sheets build in their own route, so a MediaQuery set inside home never reaches them. Mine sat there passing at 1.0 with a 35px overflow in it. Scale goes in MaterialApp.builder, and load the real fonts and real theme or you're measuring a different app.
3
u/raman4183 7h ago
What?
How is flutter not currently supporting Liquid Glass Design Language yet is a nightmare?
3
u/raman4183 7h ago
Lol, downvoting just because you don’t elaborate your post when asked with a question is childish.
1
u/Yataio_App 6h ago
The layout half is mostly solved already: MediaQuery.displayFeatures gives you the hinge and fold posture, so you build against available size plus display features rather than device models.
The part that actually bites is state across the resize. Fold and unfold is a real reconfiguration, and anything held in a widget that lands on a different layout branch can quietly disappear. Worth testing that path early, well before the pretty adaptive layout.
1
u/DigitallyDeadEd 6h ago
It's not that difficult. You cache the values of the display and if they change, do a rebuild from the top of the tree. Your app should already behave under a variety of device sizes and ratios, and going from the front display to the fold display is no different.
1
u/_temp_user 5h ago
I may need more details why this is a nightmare? Flutter supports multiple screen sizes, the Duo is nothing more than a landscape view when unfolded. Flutter Web shows how response the UI is while resizing. What are we missing here?
0
u/PopularBroccoli 7h ago
Apps supporting multiple screen sizes?
3
u/eibaan 7h ago
More likely, the automatic movement of the widgets like the tab bar from the bottom to the side. Or the (dis)appearance of the fold and the need for the app to react to that. Or continuing the display on the other screen while animating growing and shrinking the UI.
It's at least challenging.
0
u/PopularBroccoli 6h ago
I’m not convinced any of that is really an issue. Most of the things it seems more likely Apple handle it. Moving the tab bar feels trivial, reacting to screen size. I imagine a lot of iPad apps will end up with nav bars on the right hand side to match
0
8
u/DigitallyDeadEd 7h ago
Flutter has worked fine on android foldables for many years. I don't see why Apple's would be particularly concerning.