Skip to content

Files

161 lines (123 loc) · 11.4 KB

README-ZH.md

File metadata and controls

161 lines (123 loc) · 11.4 KB

🚀 快速发布您的应用: 试试 Fastforge - 构建、打包和分发您的 Flutter 应用最简单的方式。

window_manager

pub version All Contributors

这个插件为 Flutter 桌面应用程序提供了全面的窗口管理功能,使开发者能够完全控制窗口大小、位置、外观、关闭行为,以及监听事件。


English | 简体中文


平台支持

Linux macOS Windows
✔️ ✔️ ✔️

文档

快速开始

安装

将此添加到你的软件包的 pubspec.yaml 文件:

dependencies:
  window_manager: ^0.4.2

用法

import 'package:flutter/material.dart';
import 'package:window_manager/window_manager.dart';

void main() async {
  WidgetsFlutterBinding.ensureInitialized();
  // 必须加上这一行。
  await windowManager.ensureInitialized();

  WindowOptions windowOptions = WindowOptions(
    size: Size(800, 600),
    center: true,
    backgroundColor: Colors.transparent,
    skipTaskbar: false,
    titleBarStyle: TitleBarStyle.hidden,
  );
  windowManager.waitUntilReadyToShow(windowOptions, () async {
    await windowManager.show();
    await windowManager.focus();
  });

  runApp(MyApp());
}

请看这个插件的示例应用,以了解完整的例子。

相关文章

谁在用使用它?

  • Airclap - 任何文件,任意设备,随意发送。简单好用的跨平台高速文件传输APP。
  • AuthPass - 基于Flutter的密码管理器,适用于所有平台。兼容Keepass 2.x(kdbx 3.x)。
  • Biyi (比译) - 一个便捷的翻译和词典应用程序。
  • BlueBubbles - BlueBubbles is an ecosystem of apps bringing iMessage to Android, Windows, and Linux
  • LunaSea - A self-hosted controller for mobile and macOS built using the Flutter framework.
  • Linwood Butterfly - 用 Flutter 编写的开源笔记应用
  • RustDesk - 远程桌面软件,开箱即用,无需任何配置。您完全掌控数据,不用担心安全问题。
  • Ubuntu Desktop Installer - This project is a modern implementation of the Ubuntu Desktop installer.
  • UniControlHub - Seamlessly bridge your Desktop and Mobile devices
  • EyesCare - A light-weight application following 20 rule adherence for optimum eye health

贡献者

LiJianying
LiJianying

💻
 A Arif A S
A Arif A S

💻
J-P Nurmi
J-P Nurmi

💻
Dixeran
Dixeran

💻
nikitatg
nikitatg

💻
Kristen McWilliam
Kristen McWilliam

💻
Kingtous
Kingtous

💻
Prome
Prome

💻
Bin
Bin

💻
youxiachai
youxiachai

💻
Allen Xu
Allen Xu

💻
CodeDoctor
CodeDoctor

💻
Jean-Christophe Binet
Jean-Christophe Binet

💻
Jon Salmon
Jon Salmon

💻
Karol Wrótniak
Karol Wrótniak

💻
LAIIIHZ
LAIIIHZ

💻
Mikhail Kulesh
Mikhail Kulesh

💻
Prateek Sunal
Prateek Sunal

💻
Ricardo Boss
Ricardo Boss

💻
Add your contributions

许可证

MIT