Skip to content
pubscout

duo_kit

0.2.0, released 5 days ago by leancode.co

Flutter widgets to layout content around a foldable device’s hinge and strip

WASM-ready
$ flutter pub add duo_kit
Source repository

What it does

Provides FoldScaffold, FoldSplitView, FoldAnchor and FoldBridge to position navigation, split panes and dialogs relative to a fold or strip. It preserves widget state across folding and handles insets and keyboard placement.

AI-written summary of version 0.2.0, based on the package's README and metadata. Report an inaccuracy

Use it when

  • You need to support iPhone Duo or other foldable devices
  • Your app already defines its own navigation and content widgets
  • You want state to survive folding without custom logic

Skip it when

  • You only target non-foldable devices
  • You need a fully themed platform UI like adaptive_platform_ui

Strengths

  • Keeps state across folds
  • Handles insets and keyboard automatically
  • Supports dialogs and sheets in the correct half
  • Works on Android, iOS, web, desktop

Weaknesses

  • Requires iOS 27.1 SDK for full functionality
  • Only works on iPhone Duo for fold data; other foldables rely on Flutter’s displayFeatures
  • Needs manual wrapping with FoldBridge on iOS

Setup

Kind
Plugin (native code)
Effort
Medium
Code generation
No
Direct dependencies
0

Wrap the root widget with FoldBridge on iOS, target iOS 15+, use Xcode 27.1 SDK, ensure Flutter 3.41+ and no UIRequiresFullScreen. No build_runner needed.

```dart
import 'package:duo_kit/duo_kit.dart';

void main() => runApp(const FoldBridge(child: MyApp()));

class MyApp extends StatelessWidget {
  const MyApp({super.key});
  @override
  Widget build(BuildContext context) => MaterialApp(
    home: FoldScaffold(
      navigationBuilder: (ctx) => BottomNavigationBar(items: [...]),
      body: FoldSplitView(
        left: ListView(...),
        right: DetailView(...),
      ),
    ),
  );
}
```

Alternatives

Packages that do the same job and could replace duo_kit.