leanflutter / window_manager

This plugin allows Flutter desktop apps to resizing and repositioning the window.
https://pub.dev/packages/window_manager
MIT License
724 stars 205 forks source link

设置启动位置后,从默认位置闪烁到居中位置。 #418

Closed 944095635 closed 10 months ago

944095635 commented 1 year ago

` //Windows if (Platform.isWindows) {

await windowManager.ensureInitialized();

WindowOptions windowOptions = const WindowOptions(

  size: Size(1100, 760),

  center: true,

  skipTaskbar: false,

  backgroundColor: Colors.white,

  titleBarStyle: TitleBarStyle.hidden,

);

windowManager.waitUntilReadyToShow(windowOptions, () async {

  await windowManager.show();

  await windowManager.focus();

});

}

`

当设置center: true时,窗口的初始位置 会从 默认位置闪烁到 居中,这样的体验不太好,有没有方法可以改进?

anchao-lu commented 10 months ago

可以 await windowManager.waitUntilReadyToShow 试试

lijy91 commented 10 months ago

你可以查看启动时隐藏相关的文档来解决这个问题 https://github.com/leanflutter/window_manager?tab=readme-ov-file#hidden-at-launch