这使用了一个临时解决方案:隐藏窗口时,不透明度设置为 0;再次显示窗口时,不透明度恢复正常,从而避免闪烁问题。
This uses a temporary workaround: when the window is hidden, its opacity is set to 0; when the window is shown again, the opacity returns to normal, thus avoiding the flickering issue.
// Show window to fix white screen startup issue
static Future showWindowFixWhiteLaunch() async {
await windowManager.setOpacity(1.0);
await windowManager.show();
}
// Hide window to fix white screen startup issue
static Future hideWindowFixWhiteLaunch() async {
await windowManager.setOpacity(0.0);
await windowManager.hide();
}
但显然这是一个问题,希望修复