Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Flutter Desktop - System tray implementation

I am new to flutter i am struggling to create a system tray implementation.

What i need is:

  1. Create a tray icon for my application.
  2. Be able to hide and show the application window through the tray icon right click menu.
  3. Be able to add options to tray icon right click menu, like open screen X.
  4. Be able to start and stop some process, and change the tray icon on real time (see image below).

enter image description here

Can someone guide me ? :D

P.S.: My application will run on Windows, Linux and MacOS.

Thanks all!

like image 310
Gabriel Dias Avatar asked Jun 12 '26 23:06

Gabriel Dias


1 Answers

As of October 2021, there is no official support in Flutter for working with the System Tray, but there are a number of libraries that can help you:

  • Tray Manager (link)
  • System Tray (link)

Both of them are compatible with desktop apps on Windows, Mac & Linux (in Linux you have to do some extra configuration process, and actually I'm struggling to make it works in Debian Linux with KDE).

Both also gives you the option to edit the icon and to add the options menu.


To hide and show the application window, again there is no official support by Flutter, but again there is one library that can help you: Window Manager (link).


And finally, in your last point, you ask for "Be able to start and stop some process". Here you don't need an external library, because you have a very useful class in dart:io, that is Process (link)

like image 96
Pablo Insua Avatar answered Jun 14 '26 18:06

Pablo Insua



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!