foldable
1.0.5, released 8 weeks ago by medialyra.com
iPhone Duo hinge angle, fold posture and fold/camera regions for Flutter.
What it does
Bridges iPhone Duo hinge angles, fold postures, and display regions to Flutter via a platform channel. Provides widgets and streams to build fold-aware layouts and handle size classes on iOS.
AI-written summary of version 1.0.5, based on the package's README and metadata. Report an inaccuracy
Use it when
- Building a Flutter app that needs to support the iPhone Duo foldable device
- Reading live hinge angles or fold postures on iOS
- Adapting layouts based on iOS size classes and fold geometry
Skip it when
- Working exclusively on non-iOS platforms where this package provides no fold data
- Looking for a generic Android folding screen solution which Flutter handles natively
Strengths
- Safe to depend on unconditionally on non-foldable and non-iOS devices
- Provides both stream-based low-level angle access and InheritedModel widget tree integration
- Opt-in MediaQuery display feature bridging to prevent accidental dialog splitting
Weaknesses
- Limited to iOS foldables (specifically iPhone Duo)
- Requires manual Podfile and target adjustments on newer Xcode toolchains
Setup
- Kind
- Plugin (native code)
- Effort
- Medium
- Code generation
- No
- Direct dependencies
- 1
Requires raising the iOS deployment target to 15.0 in the Podfile and configuring Xcode build settings for compatibility with newer toolchains.
FoldableProvider(
child: MaterialApp(
home: FoldAwareBuilder(
builder: (context, constraints, fold) {
if (!fold.spansDivision) return const SinglePane();
return Row(
children: const [Expanded(child: Leading), Expanded(child: Trailing)],
);
},
),
),
)Alternatives
Packages that do the same job and could replace foldable.
- foldable_device
Foldable posture, hinge angle, and reserved screen regions for Android foldables and the iPhone Duo.
64Compare - flutter_next
Responsive layout, themed controls, and motion based on parent width.
77Compare - duo_kit
Flutter widgets to layout content around a foldable device’s hinge and strip
78Compare - custom_adaptive_scaffold
Drop-in adaptive Material 3 scaffolding and responsive layout widgets for Flutter apps.
76Compare
Works with
Packages commonly used together with foldable: ones it builds on, ones built on it, and its own family.
- plugin_platform_interfacefoldable depends on itReusable base class for platform interfaces of Flutter federated plugins.
- adaptive_platform_uiBuilt on foldableAdaptive platform-specific widgets for Flutter. Auto renders native iOS 26+ liquid glass designs, traditional Cupertino widgets for older iOS versions, Material Design for Android.