I have written a Flutter Desktop app for windows and I want to change the name and icon of app. I change icon from windows>runner>resources and I change app name from windows>runner>main.cpp. They look changed when I debug. But when I get a build with command flutter build windows, the .exe coming to my Release folder is still with old name and flutter icon. I also want the .exe coming from build with new icon and name. How can I do it?
1 Answer
For APP Icon
esay way too add app icon use flutter plugin flutter_launcher_icons after add that code in pub.yam file.
dev_dependencies: flutter_launcher_icons: "^0.10.0" flutter_icons: android: "launcher_icon" ios: true image_path: "assets/icon/icon.png" min_sdk_android: 21 web: generate: true image_path: "path/to/image.png"` background_color: "#hexcode" theme_color: "#hexcode" windows: generate: true image_path:"path/to/image.png" icon_size: 48 if you change window,web ya android application icon just add your icon path on that particular device application.
If you name your configuration file something other than flutter_launcher_icons.yaml or pubspec.yaml you will need to specify the name of the file when running the package.
flutter pub get flutter pub run flutter_launcher_icons:main -f <your config file name here> - Second Way
go your Project file in that location windows\runner\resources on that resource folder youcan see your window application image change that image with your chossen image.
Change APP Name
- You can use plugin rename: ^2.0.1 too change application name
You can change the bundleId and appName in following folders - IOS
- Android
- MacOS
- Linux
- Web
- Window you just install that pluging and after you just type command. that command chage your application name in all device application.
pub global run rename --appname "Network App"
but if you change only particular device app.so you can type that command.
pub global run rename --bundleId com.example.android.app --target -t, --target Set which platforms to target. [android, ios, macOS, linux]