unfold 0.2.0
unfold: ^0.2.0 copied to clipboard
iPhone Duo and foldable layouts for Flutter, from UIKit's own APIs: reserved regions, vertical bars, size classes and UIHinge. Android foldables work too.
0.2.0 #
First release as unfold, formerly duo_layout.
- iOS: reserved regions now include inactive ones, read with
.includeInactive. - iOS: regions are read where UIKit tracks them (
updateConstraints) instead of on timers. - iOS:
UITraitCollection.verticalBarEdge(barEdge) and the horizontal and vertical size classes. - iOS:
UnfoldFlutterViewControllerandUnfold.setVerticalBarEnabledturn the vertical bar off (preferredVerticalBarBehavior). - The hinge angle moved to its own stream,
Unfold.hingeAngle, andHingeAngleBuilder, so layout does not rebuild while the hinge moves.DeviceGeometry.hingeis aHingeStatus?. DeviceGeometryScopeis anInheritedModel:foldOf,hingeOf,horizontalSizeClassOf,verticalSizeClassOfandsideStripOfrebuild only on their part.foldis in effect only while the device is partially open.divisionLineandevenColumnsfor layouts that should not move with the hinge.DisplayFeatureBridge: optionally publishes iPhone Duo's cutouts and fold toMediaQuery.displayFeatures, so dialogs and sheets open on one side of the fold.AdaptiveNavigationScaffold:title,actionsat the top of the column with an overflow menu, andcompression.FoldSplit,OcclusionSafeAreaandDeviceGeometry.occlusionInsets.- Android is declared as a platform. Flutter 3.44 is the minimum.
- Swift Package Manager and CocoaPods both ship the privacy manifest.
0.1.0 #
Published as duo_layout.
DeviceGeometry: occlusion and division regions, UIKit's side bar regions, hinge status and angle (degrees), fold and side strip,supported.- iOS:
UIView.reservedRegions(kind:),UIView.LayoutRegion.bar(onEdge:extent:)andUIHingeInteraction(iOS 27.1 SDK), streamed live and re-read once the window settles. - Android: display features (Jetpack WindowManager) through
MediaQuery. AdaptiveNavigationScaffold: tabs in the iPhone Duo's status bar column, a rail on wide windows, a bottom bar on phones.DeviceGeometryScope,context.deviceGeometryandTabletopSplit.
