Skip to content

Remove or replace window_manager for Swift Package Manager compatibility #83

Description

@tilucasoli

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Fields

    No fields configured for Task.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions