Initial commit

This commit is contained in:
admin1
2026-07-14 11:11:36 +08:00
commit 656499cf94
604 changed files with 119518 additions and 0 deletions
+21
View File
@@ -0,0 +1,21 @@
import 'package:shared_preferences/shared_preferences.dart';
import 'package:window_manager/window_manager.dart';
const String kWinWidthKey = 'window_width';
const String kWinHeightKey = 'window_height';
const String kWinXKey = 'window_x';
const String kWinYKey = 'window_y';
Future<void> saveWindowBounds() async {
try {
final size = await windowManager.getSize();
final position = await windowManager.getPosition();
final prefs = await SharedPreferences.getInstance();
await prefs.setDouble(kWinWidthKey, size.width);
await prefs.setDouble(kWinHeightKey, size.height);
await prefs.setDouble(kWinXKey, position.dx);
await prefs.setDouble(kWinYKey, position.dy);
} catch (_) {}
}