mirror of
https://github.com/EasyTier/astral.git
synced 2025-05-19 10:30:24 +00:00
- 在`windowconfiguration.dart`中添加窗口标题"Astral"并确保窗口管理器初始化 - 在`runner.exe.manifest`中添加UTF-8编码、长路径支持和SegmentHeap堆类型配置 - 在`Runner.rc`中更新应用描述、内部名称、原始文件名和产品名称为"Astral" - 在`main.cpp`中实现单实例应用逻辑并更新窗口标题为"Astral"
21 lines
618 B
Dart
21 lines
618 B
Dart
import 'package:flutter/material.dart';
|
|
import 'package:window_manager/window_manager.dart';
|
|
|
|
Future<void> setupWindow() async {
|
|
await windowManager.ensureInitialized();
|
|
WindowOptions windowOptions = const WindowOptions(
|
|
size: Size(850, 520),
|
|
minimumSize: Size(300, 300),
|
|
center: true,
|
|
backgroundColor: Colors.transparent,
|
|
skipTaskbar: false,
|
|
titleBarStyle: TitleBarStyle.hidden, // 隐藏标题栏
|
|
title: "Astral", // 添加窗口标题
|
|
);
|
|
|
|
await windowManager.waitUntilReadyToShow(windowOptions, () async {
|
|
await windowManager.show();
|
|
await windowManager.focus();
|
|
});
|
|
}
|