Skip to main content

foldable_device 1.0.2 copy "foldable_device: ^1.0.2" to clipboard
foldable_device: ^1.0.2 copied to clipboard

Foldable posture, hinge angle, fold direction and reserved regions (fold, camera) for Android foldables and the iPhone Duo (iOS 27.1+).

1.0.2 #

  • Duplicate event suppression: a distinct() filter on the native event stream drops events where state, angle, orientation, hinge direction and fold-active are all unchanged. Prevents redundant rebuilds on Android (hinge-angle sensor re-sends at ~60 Hz) and on iOS constraint updates.
  • Example: Android Gradle downgraded to 8.9.1 / Gradle 8.11.1 to match the Flutter stable toolchain and fix a jcenter() build failure from the split_screen dependency.

1.0.1 #

  • Fix: the README screenshots now load on pub.dev. Image links point to a fixed GitHub commit.
  • The Example tab now shows the full walkthrough (example/example.md): screenshots, pubspec.yaml, main.dart and home_screen.dart, instead of only main.dart.

1.0.0 #

  • First stable release on pub.dev.
  • Example app updated: FoldSafeArea around the whole body, a hidden status bar, two panes only for a vertical (book) fold, and a live status line.
  • Screenshots from the iPhone Duo simulator in doc/screenshots/ (also shown in the pub.dev gallery) and a demo video in doc/demo.mp4 on GitHub.
  • Android package renamed to com.esmailelmahdy.foldable_device.

0.1.1 #

  • MIT license, pub.dev metadata (topics, issue tracker) and podspec details.
  • The example's full pubspec.yaml, main.dart and home_screen.dart are now shown on the pub.dev Example tab (example/README.md).
  • 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 through updateConstraints() as Apple recommends.
  • FoldRegion, FoldableHelper.fold, isFoldActive, occlusions and avoidInsets().
  • 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/.
16
likes
160
points
103
downloads
screenshot

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

Foldable posture, hinge angle, fold direction and reserved regions (fold, camera) for Android foldables and the iPhone Duo (iOS 27.1+).

Repository (GitHub)
View/report issues

Topics

#foldable #hinge #dual-screen #iphone #layout

License

MIT (license)

Dependencies

flutter

More

Packages that depend on foldable_device

Packages that implement foldable_device