From 39198a59fc69852884af78315cb7028469188e8c Mon Sep 17 00:00:00 2001 From: Feodor Fitsner Date: Tue, 5 Nov 2024 11:15:30 -0800 Subject: [PATCH] FLET_HIDE_APP_ON_START --- {{cookiecutter.out_dir}}/lib/main.dart | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/{{cookiecutter.out_dir}}/lib/main.dart b/{{cookiecutter.out_dir}}/lib/main.dart index 49b52bf..dea0fc1 100644 --- a/{{cookiecutter.out_dir}}/lib/main.dart +++ b/{{cookiecutter.out_dir}}/lib/main.dart @@ -362,13 +362,15 @@ Future setupDesktop() async { Map env = Platform.environment; var hideWindowOnStart = env["FLET_HIDE_WINDOW_ON_START"]; + var hideAppOnStart = env["FLET_HIDE_APP_ON_START"]; debugPrint("hideWindowOnStart: $hideWindowOnStart"); + debugPrint("hideAppOnStart: $hideAppOnStart"); await windowManager.waitUntilReadyToShow(null, () async { - if (hideWindowOnStart == null) { + if (hideWindowOnStart == null && hideAppOnStart == null) { await windowManager.show(); await windowManager.focus(); - } else { + } else if (hideAppOnStart != null) { await windowManager.setSkipTaskbar(true); } });