foldable_device 0.1.1
foldable_device: ^0.1.1 copied to clipboard
Foldable posture, hinge angle, fold direction and reserved regions (fold, camera) for Android foldables and the iPhone Duo (iOS 27.1+).
0.1.1 #
- First release on pub.dev. MIT license, pub.dev metadata (topics, issue tracker) and podspec details.
avoidInsets/FoldSafeArea: camera (occlusion) padding is now vertical only. A camera at the top gives top padding, so content starts right after it; a camera at the bottom (rotated) gives bottom padding. Before, the padding was always left or right.- Only active occlusions are padded. That means the camera only while it's in use, and the status pill only while the status bar is visible. Before, an inactive camera was also padded while folded.
0.1.0 #
- Posture, hinge angle, hinge direction and window orientation: Android (hinge sensor and
WindowManager) and iPhone Duo (iOS 27.1
UIHingeInteraction). - iOS reserved regions: the fold (
.division) and the camera / status pill (.occlusion), updated throughupdateConstraints()as Apple recommends. FoldRegion,FoldableHelper.fold,isFoldActive,occlusionsandavoidInsets().FoldSafeArea: a widget that pads content away from the fold, camera and status pill.FoldableScope: rebuilds subscribed widgets on every fold change.- Logical-pixel bounds on both platforms.
- iOS packaging: CocoaPods and Swift Package Manager, with a minimum of iOS 15.0.
- Example app in
example/.