Skip to main content

unfold 0.2.0 copy "unfold: ^0.2.0" to clipboard
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: UnfoldFlutterViewController and Unfold.setVerticalBarEnabled turn the vertical bar off (preferredVerticalBarBehavior).
  • The hinge angle moved to its own stream, Unfold.hingeAngle, and HingeAngleBuilder, so layout does not rebuild while the hinge moves. DeviceGeometry.hinge is a HingeStatus?.
  • DeviceGeometryScope is an InheritedModel: foldOf, hingeOf, horizontalSizeClassOf, verticalSizeClassOf and sideStripOf rebuild only on their part.
  • fold is in effect only while the device is partially open.
  • divisionLine and evenColumns for layouts that should not move with the hinge.
  • DisplayFeatureBridge: optionally publishes iPhone Duo's cutouts and fold to MediaQuery.displayFeatures, so dialogs and sheets open on one side of the fold.
  • AdaptiveNavigationScaffold: title, actions at the top of the column with an overflow menu, and compression.
  • FoldSplit, OcclusionSafeArea and DeviceGeometry.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:) and UIHingeInteraction (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.deviceGeometry and TabletopSplit.
0
likes
160
points
204
downloads
screenshot

Documentation

API reference

Publisher

verified publisherdvillegas.com

Weekly Downloads

iPhone Duo and foldable layouts for Flutter, from UIKit's own APIs: reserved regions, vertical bars, size classes and UIHinge. Android foldables work too.

Repository (GitHub)
View/report issues

Topics

#foldable #iphone-duo #adaptive #layout #responsive

License

MIT (license)

Dependencies

flutter

More

Packages that depend on unfold

Packages that implement unfold