antler119 / system_tray

A Flutter package that makes it easy to customize and work with your Flutter desktop app's system tray.
MIT License
217 stars 54 forks source link

Hide window on start up macos #23

Closed ghost closed 2 years ago

ghost commented 2 years ago

Hi, How can I hide the window and remove the icon from the dock on startup on macos?

thanks.

ghost commented 2 years ago

In the example in main()->doWhenWindowReady() I commented out win.show(); and the app starts without showing the window.

PS: and if you want to start the application without having an icon in the task bar on macos you have to add in macos/Runner/Info.plistin your project directory:

<key>LSUIElement</key>
<true/>