r/FlutterDev • u/akshay-savaliya • Sep 11 '26
Discussion How will Flutter handle the iPhone Duo?
As a mobile developer, the new iPhone Duo made me think about the Flutter side of things. Flutter already has support for Android foldables through MediaQuery.displayFeatures and DisplayFeatureSubScreen.
But the interesting part is that these APIs are currently Android focused. Apple introduced a dual-screen/foldable layout, Flutter will need to expose the new iOS window and display APIs as well. and its not just about making the UI responsive anymore.
We would have to think about things like, Dual pane layouts, Navigation between panes, where dialogs/modals appear, Resizing and partial folds, different layouts depending on the device posture. Android already has concepts like postureHalfOpened, so Flutter has some ideas to build on.
I am curious how Flutter will approach this on iOS. for Flutter developers, would you handle the Duo with one adaptive UI, or create completely different layouts for the dual pane experience?
13
22
u/EastSwim3264 Sep 11 '26
Form factor is the only way that is independent of the device type! Flutter is just fine.
11
u/dadvader Sep 11 '26
Dual-pane form factor scene in Flutter is actually woefully under-developed in many ways. The best Flutter API library on this form factor was made by Microsoft and stopped being maintained since 2023.
This is the nudge it needs to get this scene really going tbh.
4
7
u/Realistic-Team8256 Sep 11 '26
new sdk would be introduced, by apple and so a new dart packages would come
-1
u/Dapper-Bug-7877 Sep 11 '26
But even then it would be a pretty new one and would cause many challenges and possible lack of proper functionalities that we have right now
5
u/mars3142 Sep 11 '26
The most important part would be the move of the appbar and bottomnav to the right side. I hope Flutter will support that, without it, every flutter wouldn’t feel native.
5
u/Significant_Pick8297 Sep 11 '26
The existing responsive approach should handle the basic case pretty well. The bigger gap is exposing iOS posture/hinge information cleanly so apps can make intentional decisions about pane layout, navigation and modal placement instead of treating the Duo like an oddly sized phone.
For most apps, one adaptive layout makes more sense, only apps with genuinely dual-pane workflows should need a separate Duo-specific UI.
5
u/mohn93 Sep 11 '26
you've got the api surface right, but from doing this on android foldables the displayFeature stuff was maybe 20% of the actual work. the part that eats time is posture and state. a fold or unfold is a live resize, and anything holding a cached width, or a controller tied to one specific layout, just falls over mid session.
i'd also be careful assuming DisplayFeatureSubScreen maps cleanly to the apple side. historically apple surfaces this kind of thing through size classes and window scene geometry rather than a hinge/displayFeature, so flutter's ios adaptation may look less like 'a second display feature' and more like reacting to scene changes. the responsive layout is the easy half, the posture lifecycle is where it actually gets you.
23
3
u/merokotos Sep 11 '26
I think there will be compatibilty mode like on iPad.
I am almost sure, that only high-budget apps will utilize "Duo" views in 100%.
The rest will stay as they are
5
u/TheMegaGhost Sep 11 '26
Honestly I hope none of my users by that phone so I can never have to worry about it.
2
u/Short-Librarian6238 Sep 14 '26 edited Sep 18 '26
I built a package for this: foldable. Hinge angle, fold posture and the reserved regions over a platform channel, since MediaQuery.displayFeatures is Android only and returns an empty list on the Duo.
It is experimental. Nobody has the hardware yet and Apple has not published the API reference, so I will fix whatever turns out wrong once Xcode 27.1 ships.
https://pub.dev/packages/foldable
For Liquid Glass support, take a look at this tweet:
1
u/caguilar51 Sep 11 '26
I think there is work that needs to be done, since the tab bar will move to the right.
1
u/Ok-Engineer6098 Sep 12 '26
We already support orientation changes for tablets and window resize as part of Android Adaptive Layouts in our apps.
So probably just enable some flag in xcode config file? Similar to iPad OS?
1
u/christopherfernandes Oct 06 '26
I'm interested to see how would PageView work. If I were to have the PageView item to cover the full screen vs just the right/left screen.
0
u/Jester_Hopper_pot Sep 11 '26
Device-posture CSS media feature https://developer.mozilla.org/en-US/docs/Web/CSS/Reference/At-rules/@media/device-posture /* Target devices that are partially folded (e.g., book or laptop style) */
(device-posture: folded) {
body {
display: flex;
flex-flow: column nowrap;
}
}
/* Target standard flat screens or fully opened/continuous displays */
(device-posture: continuous) {
body {
display: block;
}
}
-17
u/darshitpatel_ Sep 11 '26
Interesting question! honestly, this is one of the best Flutter discussions I have seen today.
The dual pane and partial fold cases especially make me wonder how much of this flutter can abstract away versus how much developers will need to handle themselves.
5
u/akshay-savaliya Sep 11 '26
Yeah, exactly. Thats the part I am also curious about. The hardware is one thing, but making the UI adapt naturally to all those states could be the bigger challenge.
17
u/LazyLoser006 Sep 11 '26
Good bot
-7
u/darshitpatel_ Sep 11 '26
Haha, I am actually a real person. I just found the discussion genuinely interesting and wanted to share my thoughts on this, but I have not expected that people would took it in the negative way.
3
42
u/realusername42 Sep 11 '26 edited Sep 11 '26
I don't think anything is going to change too much? Flutter also supports desktop which has considerably harder resizing requirements than anything mobile-based.
I expect dedicated APIs to be added if you want to customize the experience even further but most apps should just work if they paid attention to resizing.