DEV Community

Jan Mewes
Jan Mewes

Posted on • Edited on

5 1

Flutter: Linux: Snap Desktop Icon

This blog post describes how to add an icon to a Flutter Linux Desktop app.

It is assumed that Snapcraft is being used to compile and install the app, as explained in the Flutter documentation.

Goals

After installing the app, the app's icon should show up in the application menu.

Alt Text

Further, when the app is running, the app's icon should be in the launcher bar.

Alt Text

Snap configuration

This functionality has nothing to do with Flutter, but needs to be configured in the Snap level.

Withing the snap folder, create a gui subfolder. There create a desktop file, e.g. succedo.desktop. In the "Icon" row needs to be a reference to the Snap metadata.

[Desktop Entry]
Icon=${SNAP}/meta/gui/succedo.png
Exec=succedo
Version=1.0
Type=Application
Name=Succedo
Terminal=false
Enter fullscreen mode Exit fullscreen mode

The icon should be placed in the same directory as the desktop file. It can have either PNG or SVG format. For PNG images a file size of 256x256 pixels is recommended.

References

Sentry mobile image

Mobile Vitals: A first step to Faster Apps

Slow startup times, UI hangs, and frozen frames frustrate users—but they’re also fixable. Mobile Vitals help you measure and understand these performance issues so you can optimize your app’s speed and responsiveness. Learn how to use them to reduce friction and improve user experience.

Read the guide →

Top comments (0)

AWS Security LIVE!

Join us for AWS Security LIVE!

Discover the future of cloud security. Tune in live for trends, tips, and solutions from AWS and AWS Partners.

Learn More

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay