登录 注册
开发者工具数据分析与数据处理 flutterflutter-desktopflutter-weblinuxmacoswindow-manager
851
Stars
318
Forks
10
Watchers
12
Open Issues
MIT
许可证
Dart
语言
2021-07-18
创建时间
2026-11-07
最近更新

项目能做什么

Flutter 桌面端窗口管理插件,全面支持控制窗口大小、位置、外观、关闭行为及事件监听。
来源:AI 基于仓库事实生成 · 内容以仓库实际 README 为准

使用说明 查看原始 README 原仓库文档

中文使用说明暂未生成。下面保留原仓库 README 摘录,命令与配置均以原文为准。
原始 README 摘录(英文原文,节选前 3000 字符)
> **window_manager is built on [nativeapi](https://github.com/libnativeapi/nativeapi)**, a
> Flutter binding of one C++ core library ([libnativeapi/nativeapi](https://github.com/libnativeapi/nativeapi))
> shared by macOS, Windows and Linux. Coming from 0.5.x? See [Upgrading from 0.5.x](#upgrading-from-05x).

> **Issues:** Please report bugs and feature requests in [nativeapi issues](https://github.com/libnativeapi/nativeapi/issues). Include the package name, version, operating system, and a minimal reproduction.

# window_manager

[![pub version][pub-image]][pub-url] [![][discord-image]][discord-url] [![All Contributors][all-contributors-image]](#contributors)

[pub-image]: https://img.shields.io/pub/v/window_manager.svg
[pub-url]: https://pub.dev/packages/window_manager
[discord-image]: https://img.shields.io/discord/884679008049037342.svg
[discord-url]: https://discord.gg/zPa6EZ2jqb
[all-contributors-image]: https://img.shields.io/github/all-contributors/leanflutter/window_manager?color=ee8449&style=flat-square

This package lets Flutter desktop apps size, move, show, hide and decorate their own
window.

English | [简体中文](./README-ZH.md)

---

<!-- START doctoc generated TOC please keep comment here to allow auto update -->
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->

- [Platform Support](#platform-support)
- [Quick Start](#quick-start)
  - [Installation](#installation)
    - [Requirements](#requirements)
  - [Usage](#usage)
    - [Upgrading from 0.5.x](#upgrading-from-05x)
    - [Moving to the native API](#moving-to-the-native-api)
- [Articles](#articles)
- [Who's using it?](#whos-using-it)
- [API](#api)
  - [Native API](#native-api)
- [Contributors](#contributors)
- [License](#license)

<!-- END doctoc generated TOC please keep comment here to allow auto update -->

## Platform Support

| Linux | macOS | Windows |
| :---: | :---: | :-----: |
|  ✔️   |  ✔️   |   ✔️    |

## Quick Start

### Installation

Add this to your package's pubspec.yaml file:

```yaml
dependencies:
  window_manager: ^0.6.0
```

Or

```yaml
dependencies:
  window_manager:
    git:
      url: https://github.com/leanflutter/window_manager.git
      ref: main
```

#### Requirements

- Flutter 3.47 / Dart 3.13 or later, macOS 10.15 or later.
- Linux build machines need GTK 3, X11 and Xi development files:

```
sudo apt-get install libgtk-3-dev libx11-dev libxi-dev
```

### Usage

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

final window = WindowManager.instance.getCurrent()!;

window.title = 'window_manager';
window.setSize(const Size(1000, 700).toNative(), false);
window.minimumSize = const Size(640, 480).toNative();
window.center();
window.show();

// Every window event of every window of this app.
WindowManager.instance.addListener((event) {
  switch (event) {
    case WindowFocusedEvent():
      debugPrint('window ${event.windowId} focused');
    case WindowResizedEvent():
      debugPrint('window ${event.windowId} is now ${event.new
阅读完整原文

商业机会分析 AI 生成

Flutter 桌面端专业级 UI 框架与脚手架模板 (Commercial Template)

产品构想基于 window_manager 封装开箱即用的商业级桌面端壳工程,提供原生质感标题栏、Mica/磨砂半透明特效、窗口状态记忆持久化、多标签页窗口管理等组件。
核心功能深度适配三端的自定义标题栏(含最小化/最大化/关闭按钮行为)、窗口尺寸与屏幕位置持久化恢复机制、多标签页/分屏布局集成、自适应系统主题(深色/浅色/强调色)。
目标用户需要快速上线美观、符合桌面原生习惯软件的独立开发者和中小企业团队。
难度/周期中等 · 1-2 个月 · 成本:开发设备(需覆盖 Windows/macOS/Linux 运行环境测试)与时间成本。
收费模式通过 Gumroad、个人官网或代码市场以单项目授权或无限商用许可(License)形式按份销售。
竞争风险Flutter 桌面端整体生态体量相较于移动端和 Electron 仍然偏小,潜在买家总盘有限。
依据 数据支持的判断

企业级多窗口与大屏协同拓展套件 (Open-Core / 商业插件)

产品构想针对音视频剪辑、股票交易、医疗工控等复杂业务场景,提供高级多窗口通信同步、浮动窗口吸附(Docking)、多显示器智能调度的高级闭源扩展包。
核心功能跨窗口事件总线与状态同传、窗口边缘磁性吸附与分拆(Dock/Undock)、多显示器插拔事件容灾与窗口重定位、多进程窗口生命周期守护。
目标用户开发专业级生产力工具、桌面重度应用的 B 端企业开发团队。
难度/周期高 · 3-5 个月 · 成本:多屏幕硬件测试环境构建、复杂 C++ 与平台原生 API 联调成本。
收费模式按企业年度订阅席位收费,或提供源代码买断许可与优先技术支持合同。
竞争风险需要深入维护 Linux (X11/Wayland)、macOS (AppKit) 和 Windows (Win32) 底层代码,维护成本极高,客群决策周期长。
依据 尚需验证的假设

Flutter 桌面端企业迁移与技术咨询服务

产品构想依托在底层原生能力(C++/NativeAPI)和窗口管理上的技术沉淀,为已有移动端 Flutter 项目的企业提供向桌面端平移的架构设计、原生插件定制与上架支持。
核心功能桌面端适配架构评审、系统底层原生能力(如全局快捷键、托盘、窗口深度定制)扩展、打包与签名交付(MSIX、DMG 公证等)。
目标用户需快速扩展桌面版客户端的中大型移动互联网公司或传统行业软件服务商。
难度/周期中等 · 按项目交付(通常 2 周至 2 个月) · 成本:技术人力投入与客户沟通成本。
收费模式按技术顾问工时费计费,或按定制项目里程碑收取服务费。
竞争风险非标准化产品,收益上限受限于个人交付时间,难以规模化复制。
依据 已验证事实
AI 基于仓库公开数据分析生成,含推测成分,不构成收益承诺。
报告会保存到 个人中心

竞品与相似项目 GitHub Search 真实检索

项目中文简介Stars语言
flutter/flutter 中文介绍暂未生成
Flutter makes it easy and fast to build beautiful apps for m
181,208 Dart
rustdesk/rustdesk 中文介绍暂未生成
An open-source remote desktop application designed for self-
129,051 Rust
immich-app/immich 中文介绍暂未生成
High performance self-hosted photo and video management solu
118,864 TypeScript
localsend/localsend 中文介绍暂未生成
An open-source cross-platform alternative to AirDrop
98,470 Dart
AppFlowy-IO/AppFlowy 中文介绍暂未生成
Bring projects, wikis, and teams together with AI. AppFlowy
78,733 Dart
chen08209/FlClash 中文介绍暂未生成
A multi-platform proxy client based on ClashMeta,simple and
62,660 Dart
以上为通过 GitHub 官方 Search API 检索的相似项目,功能差异与优劣势需进一步人工确认,配置 AI 后可生成对比分析。

项目优势与风险

技术成熟度创建于 2021-07-18,近 30 天仍在推送,发布过 32 个 Release
社区活跃Star 851 / Fork 318 / Issue 12(数据支持,可自行核实)
许可证MIT
主要风险上游项目方向可能变化;同赛道竞争者较多(见竞品表);热度与需求不完全等价

安装与使用

快速开始(以仓库 README 为准)
git clone https://github.com/leanflutter/window_manager.git
cd window_manager
# 请阅读仓库 README 获取确切安装步骤(依赖、配置、启动命令)
阅读原仓库文档
术语说明:Docker=应用容器(把程序和依赖打包运行);API Key=调用外部服务的密钥;Git Clone=把仓库代码下载到本地。常见错误:API Key 未配置 / 端口占用 / 数据库连接失败,多数项目在 README 的 Troubleshooting 章节有说明。