conceptadev / conceptadev/superdeck
Remove or replace window_manager for Swift Package Manager compatibility
- Dominant language
- Dart
- Stars
- 129
- Forks
- 4
- Avg merge
- 15h 49m
- Merged PRs (30d)
- 5
Description
## Objective
Remove or replace the `window_manager` dependency so SuperDeck macOS apps can adopt Flutter's Swift Package Manager (SPM) plugin integration without falling back to CocoaPods.
## Motivation
Flutter is moving to SPM as the default dependency manager for iOS and macOS (Flutter 3.44+). Plugins that only ship CocoaPods integration block full SPM migration and trigger fallback warnings during builds.
The `window_manager` package used by SuperDeck does not currently support SPM at the version resolved in this repo (`0.4.3` in `demo/pubspec.lock`). SPM support was added upstream in `window_manager` 0.5.0, but we should still evaluate whether to keep the dependency or replace it with a lighter approach.
## Current usage
`window_manager` is imported directly in the `superdeck` package:
- `packages/superdeck/lib/src/utils/app_initialization.dart` — initializes window size (1280×720), aspect ratio (16:9), hidden title bar, show/focus on startup
- Called from `packages/superdeck/lib/src/ui/superdeck_app.dart` via `initializeDependencies()`
The dependency appears transitively in desktop app lockfiles and macOS `Podfile.lock` files (e.g. `demo/macos/Podfile.lock`, `packages/playground/macos/Podfile.lock`), indicating CocoaPods-based macOS plugin integration.
## Proposed directions
1. **Upgrade** — Bump to `window_manager` ≥ 0.5.0 if SPM support is sufficient for our macOS targets and no other blockers remain.
2. **Replace with native setup** — Configure window size, aspect ratio, and title bar style in platform runner code (`MainFlutterWindow.swift` on macOS, equivalents on Windows/Linux) and drop the plugin where possible.
3. **Alternative package** — Evaluate another desktop window plugin with SPM support if runtime window control is still required from Dart.
## Acceptance criteria
- [ ] macOS demo/playground apps build with SPM enabled (`flutter config --enable-swift-package-manager`) without CocoaPods fallback caused by `window_manager`
- [ ] Desktop presentation window behavior is preserved: 16:9 aspect ratio, 1280×720 default size, hidden title bar (macOS), show/focus on launch
- [ ] Windows and Linux desktop targets continue to work if still supported
- [ ] `window_manager` is removed from dependencies or explicitly justified if upgraded
## References
- [Flutter: Swift Package Manager for app developers](https://docs.flutter.dev/packages-and-plugins/swift-package-manager/for-app-developers)
- [window_manager changelog — SPM support in 0.5.0](https://pub.dev/packages/window_manager/changelog)
- [Flutter blog: SPM replacing CocoaPods](https://blog.flutter.dev/saying-goodbye-to-cocoapods-swift-package-manager-is-soon-the-default-in-flutter-645a92714a57)
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.