Flutter Desktop - How to Change App Icon for Windows, MacOS and Linux

In this example, we are going to show you the best way to change the icon of the desktop applications on all platforms such as Windows, macOS, and Linux. See the easy steps below to change the app icon of a desktop application.

How to Change Icon of Windows Desktop App:

Replace file windows/runner/resources/app_icon.ico to change app icon for windows platform.

How to Change Icon of macOS Desktop App:

Go to macos/Runner/Assets.xcassets/AppIcon.appiconset and replace all icon file. macOS needs different icons size for different screens and layouts. Make sure you have maintained the specific icon size before replacing files.

How to Change Icon of Linus Desktop App:

In Linux, you need to add a Desktop entry for your application to set icon. Currently, there is no option to change Linux desktop icon from the project.

While releasing app to Snap Store, Create a file with ".desktop" extension, and place to the <project root>/snap/gui/super-cool-app.desktop.

Notice: icon and .desktop file name must be the same as your app name in yaml file!

Enter the following text into .desktop file.

 [Desktop Entry]
  Name=Super Cool App
  Comment=Super Cool App that does everything
  Exec=super-cool-app 
  Icon=${SNAP}/meta/gui/super-cool-app.png # replace name to your app name
  Terminal=false
  Type=Application
  Categories=Education; #adjust accordingly your snap category

Place your icon with .png extension in your Flutter project under <project root>/snap/gui/super-cool-app.png.

Now Build, snap and release to snap store. Whenever user installs the app, it will fetch icon data from the desktop entry.

Windows Desktop App Output:

Windows Taskbar Output:

In this way, you can change the icon of Flutter desktop app.

No any Comments on this Article


Please Wait...