From ff065254ae2bb128de04f62afa377e762655fb72 Mon Sep 17 00:00:00 2001 From: bggRGjQaUbCoE Date: Tue, 21 Oct 2025 10:20:00 +0800 Subject: [PATCH] fix get window pos Signed-off-by: bggRGjQaUbCoE --- lib/utils/storage_pref.dart | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/utils/storage_pref.dart b/lib/utils/storage_pref.dart index 5d11c93c..8a92781c 100644 --- a/lib/utils/storage_pref.dart +++ b/lib/utils/storage_pref.dart @@ -826,12 +826,13 @@ abstract class Pref { _setting.get(SettingBoxKey.minimizeOnExit, defaultValue: true); static Size get windowSize { - final List? size = _setting.get(SettingBoxKey.windowSize); + final List? size = (_setting.get(SettingBoxKey.windowSize) as List?) + ?.fromCast(); return size == null ? const Size(1180.0, 720.0) : Size(size[0], size[1]); } static List? get windowPosition => - _setting.get(SettingBoxKey.windowPosition); + (_setting.get(SettingBoxKey.windowPosition) as List?)?.fromCast(); static bool get isWindowMaximized => _setting.get(SettingBoxKey.isWindowMaximized, defaultValue: false);