Migration to Flutter Guide
Discover our battle-tested 21-step framework for a smooth and successful migration to Flutter!
Home
Glossary

Flutter for macOS

What is Flutter for macOS?

Flutter for macOS lets developers build native desktop applications using the same Flutter and Dart codebase as mobile. On macOS, apps run as .app bundles and integrate with system APIs via Platform Channels, while Flutter handles rendering.

How does it work?

On macOS, Flutter adds support for desktop-specific paradigms: resizable windows, hover states for mouse input, keyboard navigation, and system menu bar integration using PlatformMenuBar.

Plugins provide access to macOS APIs like file dialogs, notifications, and hardware features. The same Platform Channel mechanism as mobile is used for system interactions.

Key characteristics

  • Resizable windows and high-DPI support for desktop displays
  • Mouse and keyboard input handling (hover, focus, keyboard shortcuts)
  • PlatformMenuBar for native macOS menus
  • Cross-platform code reuse with shared Dart business logic

Permissions and sandboxing

macOS apps are sandboxed by default in release mode. Missing entitlements can break functionality:

  • Add com.apple.security.network.client to macos/Runner/Release.entitlements for HTTP access
  • File system, camera, and microphone access require explicit entitlements
    Debug builds may work without them, but release builds fail without proper configuration.

Common mistakes to avoid

  • Running mobile UI 1:1 without adapting for desktop (missing hover effects or keyboard navigation).
  • Forgetting sandbox entitlements, causing network or file access failures.
  • Overusing Platform Views, which can impact layout and performance.
  • Neglecting system menu integration.

When to use Flutter for macOS?

Flutter is a strong choice for macOS development in these scenarios:

  • Cross-platform code reuse: If you already have a Flutter app for iOS/Android, Flutter for macOS lets you share a significant portion of the codebase (UI, business logic, state management) while adapting to desktop paradigms.
  • UI-heavy applications: Apps that rely on rich layouts, custom widgets, or complex interactions (e.g., dashboards, design tools, media apps) benefit from Flutter's rapid iteration through Hot Reload and declarative UI.
  • Rapid prototyping and iteration: Designers and developers can experiment with multiple window sizes, hover effects, and keyboard shortcuts without rewriting the app in a desktop-specific framework like AppKit.
  • Native-like desktop experience: Flutter supports desktop paradigms such as resizable windows, system menu bars via PlatformMenuBar, mouse hover effects (MouseRegion), and keyboard navigation. This makes it possible to deliver apps that feel native to macOS users without maintaining separate Swift/Cocoa code.
  • Single UI paradigm for multiple platforms: Flutter allows you to maintain consistency in look, feel, and behavior across mobile and desktop, reducing maintenance overhead while providing a cohesive brand experience.
  • Advanced graphics and animations: Flutter's GPU-accelerated rendering and Impeller engine enable smooth animations and custom drawing, which is useful for visualization tools, interactive charts, or desktop e-commerce apps.
  • Cross-platform business logic: Apps with shared business rules, networking code, or offline-first data storage can benefit from Flutter's single architecture, reducing the risk of bugs across platforms.

When not to use Flutter for macOS?

Flutter may not be suitable for macOS in these cases:

  • Deep AppKit-specific integrations: If your app relies heavily on native macOS frameworks (e.g., Core Data, advanced AVFoundation features, Spotlight integration, or custom native menus), implementing these via platform channels can become cumbersome.
  • Extreme memory or performance optimization: For small utilities or apps where minimal memory footprint and startup time are critical, Flutter's engine overhead (~10–15 MB) may be unnecessary. Lightweight apps may benefit from pure Swift/Cocoa implementations.
  • Apps requiring advanced sandboxing features: Flutter supports macOS Sandboxing, but developers must configure Release.entitlements (e.g., com.apple.security.network.client) correctly. Apps that need complex entitlements or security policies may require deeper native setup.
  • Very small, single-purpose tools: Simple utilities like menu bar apps, system monitors, or background-only services may be overkill in Flutter. Native Swift may be faster to implement and distribute.
  • Highly customized input handling: For apps that rely on precise, low-level handling of input devices (e.g., MIDI controllers, graphic tablets, or hardware keyboards with complex shortcuts), direct AppKit APIs may offer more control than Flutter’s abstraction.


Learn more

Sharing Logic Across Multiple Platforms - Solution by LeanCode

Sharing Logic Across Multiple Platforms

When a project grows, sooner or later, a need for sharing logic across multiple clients and a server arises. At LeanCode, we completed a project that extensively employed logic sharing successfully. In this article, we highlight the steps and architecture decisions of the picked solution.

Slide presented during Flutter Waraw #16

Making Mobile Apps Run On the Web With Flutter

Matej Rešetár, during Flutter Warsaw #16, talked about using Flutter for the web and explained to avoid the most common issues. Find out more about making mobile apps run on the web with Flutter by watching the video and reading participants' questions.

Flutter open source packages by LeanCode

6 Non-obvious Flutter and Dart Packages

Almost every production-grade app depends on tens of packages. Using them allows for quick implementation of standard functionalities. Take a closer look at 6 useful but not-so-popular Dart and Flutter packages made and tested by LeanCode's devs.