Skip to content
pubscout

foldable

1.0.5, released 8 weeks ago by medialyra.com

iPhone Duo hinge angle, fold posture and fold/camera regions for Flutter.

WASM-ready
$ flutter pub add foldable
Source repository

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.

Works with

Packages commonly used together with foldable: ones it builds on, ones built on it, and its own family.