nitro_fold_duo 0.0.1
nitro_fold_duo: ^0.0.1 copied to clipboard
iPhone Duo support for Flutter backed by UIKit's reserved-region, hinge and vertical-bar APIs over Nitro FFI, with fold-aware layout and Liquid Glass chrome.
0.0.1 #
Initial release: iPhone Duo support, over a Nitro FFI bridge with no method channels.
Geometry and hinge
duoStateand the derivedduoActiveDivision,duoActiveOcclusions,duoHingeStatus,duoVerticalBarEdgeandduoCornerInsetssignals report the fold, the cameras, the hinge and the corner clearance, and rebuild a widget when the device folds, rotates or changes display.DuoSplitplaces two panes either side of an active fold,DuoOcclusionSafeAreakeeps content clear of a camera, andDuoLayoutexposes the same decisions as pure functions for custom layouts.DuoDisplayFeaturespublishes the fold throughMediaQuery.displayFeatures, whichdart:uionly fills in on Android — so dialogs, popups and routes that already avoid a hinge on a Fold behave the same on iPhone Duo.
The vertical bar
DuoBarScaffoldkeeps the body clear of the strip the system reserves and draws the bar in it, falling back to your own horizontal chrome where the system keeps bars horizontal.DuoVerticalBarlays the strip out the way the system does: status clearance, back control, toolbar groups and the tab bar, each group one realUIGlassEffectcapsule, with anything that does not fit behind aUIMenu.DuoBarStyleandDuoBarThemecarry the measurements and tint;DuoBarStyle.compressionmirrorsUIVerticalBarCompressionBehavior.DuoGlassSurfaceis the same material without the buttons, for chrome that content scrolls under.
Platforms
- iOS 27.1 for the reserved-region, hinge and vertical-bar APIs; older systems
report
isSupported == false. - Android reports the fold through Jetpack WindowManager and the hinge angle through the hinge sensor.
- macOS, Windows and Linux answer the whole API as "no Duo" and ignore the bar calls, so an app can call it without a platform check.
