window_manager
이 플러그인을 사용하면 Flutter 데스크톱 앱에서 창 크기 조정 및 위치 재설정이 가능합니다.
window_manager 플러그인은 Flutter 데스크톱 애플리케이션에 대한 포괄적인 창 관리 기능을 제공하여 창 크기, 위치, 외관, 닫기 동작 및 이벤트 리스닝을 완전히 제어할 수 있게 해줍니다.
아래는 영문 원문 스냅샷입니다. 최신 내용은 GitHub에서 확인하세요.
⚠️ 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.
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 | 简体中文
| Linux | macOS | Windows |
|---|---|---|
| ✔️ | ✔️ | ✔️ |
Add this to your package's pubspec.yaml file:
dependencies:
window_manager: ^0.5.1
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.
의존성 목록 1 개
^6.2.0사용 목적에 따라 검색하고 개발 활동을 비교한 뒤 원본 저장소에서 요구 사항을 확인하세요.
“A repository is the most basic element of GitHub.”
GitHub Docs — About repositories ↗