feat: add tray functionality
Changes
This PR add tray functionality for desktop (Tested on Linux) using the tray_manager Library. Inside the tray it is possible to hide the window and show it again.
Todo before merging
- [ ] Minimize to tray on close (setting)
- [ ] play/pause button
- [ ] favorite playlists shortcut
- [ ] pause indicator on icon
- [ ] Translations
If you have any ideas about what else could be added, please leave a comment :)
Related Issues
https://github.com/jmshrv/finamp/issues/979
ran into this error message but found a temporally fix
Building Linux application...
~/Projects/Finamp-Dev/fintray/linux/flutter/ephemeral/.plugin_symlinks/tray_manager/linux/tray_manager_plugin.cc:118:17: error: 'app_indicator_new' is deprecated [-Werror,-Wdeprecated-declarations]
Building Linux application...
Error: Build process failed
Maybe there is a better way to handle this. I'm open for suggestions 😅
@F-4Dev sorry for not taking a look earlier. Definitely an interesting feature, although I don't tend to use tray shortcuts anymore. I guess the related settings could go into the "Interaction" settings.
There's a migration warning for that package now, although that seems to be internal refactoring and nothing that we should do, so it's probably fine.
Do you need any help with the functionality, beyond Linux stuff? :)
@Chaphasilor Oh okay, then there will probably some changes to be made at some point, but we'll see. I think I need help with the closing behavior of Finamp. I'd like to close the App, but keep living in the background (tray) somehow. What I mean is, when closing the window, it should only be hidden and not fully closed if that makes sense "^^ I know that Local Send is also Flutter and it has the behavior and I tried handling closing the same but I couldn't get it to work sadly.
and don't worry about answering late :)