opt: center/align topright when toggle chat

This commit is contained in:
Kingtous 2022-09-23 10:18:30 +08:00
parent 204eab4b81
commit f1bfb12494

View File

@ -167,8 +167,10 @@ class ChatModel with ChangeNotifier {
_isShowChatPage = !_isShowChatPage;
notifyListeners();
await windowManager.setSize(Size(400, 600));
await windowManager.setAlignment(Alignment.topRight);
} else {
await windowManager.setSize(Size(800, 600));
await windowManager.center();
await Future.delayed(Duration(milliseconds: 100));
_isShowChatPage = !_isShowChatPage;
notifyListeners();