パッケージ、リポジトリ、アプリカテゴリを検索

パッケージ詳細v0.6.0

window_manager

このプラグインにより、Flutter デスクトップアプリケーションでウィンドウのサイズ変更と再配置が可能になります。

macOSWindowsLinux
30日間ダウンロード
93.2万
いいね数
1130
Pub ポイント
160

パッケージをインストール

flutter pub add window_manager

パッケージ概要

公開情報に基づく選定ガイドです。参考としてご利用ください。

window_manager は、macOS、Windows、Linux 用のデスクトップアプリケーション向けに設計された Flutter プラグインです。開発者がウィンドウのプロパティ(サイズ、位置、表示状態など)をプログラムで制御できるようにします。このパッケージを使用することで、ユーザーはウィンドウのサイズや位置を動的に変更でき、デスクトップ中心の Flutter アプリにおけるユーザーエクスペリエンスを向上させます。ネイティブコードを必要とせずに、ウィンドウの挙動を管理するためのシンプルな API を提供しています。プラグインは Flutter の UI フレームワークとシームレスに統合され、複数プラットフォーム間での応答性のあるウィンドウ管理をサポートしています。

用途

  • プログラムでウィンドウのサイズを変更する
  • アプリケーションウィンドウの再配置
  • ウィンドウの表示状態の管理
  • 浮遊またはドラッグ可能なウィンドウの作成
  • カスタムウィンドウ動作の実装

主な機能

  • クロスプラットフォーム対応(macOS、Windows、Linux)
  • ウィンドウ操作のためのシンプルな API
  • ウィンドウのリサイズおよび位置指定をサポート
  • ネイティブプラットフォームコードの必要はありません
  • Flutter UI とのシームレスな統合

適している対象

  • デスクトップを最優先とするFlutterアプリケーション
  • 動的ウィンドウ制御を必要とするアプリ
  • 複数のデスクトッププラットフォームをターゲットにする開発者
  • カスタムウィンドウレイアウト
  • 高度なデスクトップUX機能

注意事項

  • Flutter 3.0 以上が必要です
  • デスクトッププラットフォームに限定
  • プラットフォーム固有の構成が必要になる場合があります
  • モバイルまたはWebアプリには適していません
  • 動作環境によって動作がわずかに異なる場合があります

元の README

関連するソースリポジトリの README 原文のスナップショットです。最新の内容はリポジトリをご覧ください。

⚠️ Migration Notice: This plugin is being migrated to libnativeapi/nativeapi-flutter

The new version is based on a unified C++ core library (libnativeapi/nativeapi), providing more complete and consistent cross-platform native API support.

window_manager

pub version Pub Monthly Downloads All Contributors

This plugin provides comprehensive window management capabilities for Flutter desktop applications, enabling full control over window size, position, appearance, close behavior, and listening to events.


English | 简体中文


Platform Support

Linux macOS Windows
✔️ ✔️ ✔️

Documentation

Quick Start

Installation

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

dependencies:
  window_manager: ^0.5.1
Usage
import 'package:flutter/material.dart';
import 'package:window_manager/window_manager.dart';

void main() async {
  WidgetsFlutterBinding.ensureInitialized();
  // Must add this line.
  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());
}

Please see the example app of this plugin for a full example.

Related Articles

Who's using it?

  • Airclap - Send any file to any device. cross platform, ultra fast and easy to use.
  • AuthPass - Password Manager based on Flutter for all platforms. Keepass 2.x (kdbx 3.x) compatible.
  • Biyi (比译) - A convenient translation and dictionary app written in dart / Flutter.
  • 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 - Open source note taking app written in Flutter
  • RustDesk - Yet another remote desktop software, written in Rust. Works out of the box, no configuration required.
  • 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

Contributors

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

License

MIT

カテゴリー

依存関係

依存関係一覧 2 件

ソースリポジトリ

このパッケージを使用しているプロジェクト

ランキング