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
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.
- custom_adaptive_scaffold
Drop-in adaptive Material 3 scaffolding and responsive layout widgets for Flutter apps.
76Compare - multi_split_view
Provides horizontal or vertical multiple split views for Flutter layouts.
75Compare - foldable_device
Foldable posture, hinge angle, and reserved screen regions for Android foldables and the iPhone Duo.
64Compare - split_view
Provides horizontal or vertical split view for Flutter applications.
65Compare