How to Change the Application Launcher Icon on Flutter?
When users create a project using the command Flutter Create projectname user will get FlutterLogo as an application launcher icon on Flutter Mobile Application. To replace this Flutter Logo users need to follow the below instructions. So let’s get started with How to Change the Application Launcher Icon on Flutter.
How to Change the Application Launcher Icon on Flutter?
Flutter Launcher Icons has been designed to help quickly generate launcher icons for both Android and iOS.
- Add the package to your pubspec.yaml file within your Flutter project to use it.
- Within pubspec.yaml file specifies the path of the icon you wish to use for the app and then choose whether you want to use the icon for the iOS app, Android app, or both.
- Run the package
- Voila! The default launcher icons have now been replaced with your custom icon
Setting the launcher icons like a native developer
Android
Android launcher icons have both a foreground and a background layer.
Application Launcher Icon
Right-click on the android folder in the project outline. Go to New > Image Asset. Try right-clicking the android/app folder if you don’t see Image Asset as an option. Now you can select an image to create your launcher icon from.
Application Launcher Icon Android
This will replace the current launcher icons. So you can find the generated icons in the mipmap folders:
App Launch icon
Finally, make sure that the launcher icon name in the AndroidManifest is the same as what you called it above (ic_launcher by default):
application android:icon="@mipmap/ic_launcher"
Now run the app in the emulator to confirm that the launcher icon was created successfully.
iOS
There is a free app in the Mac App Store called Icon Set Creator After you have created the icon set, start Xcode assuming you have a Mac and use it to open the ios folder in your Flutter project. Then go to Runner > Assets.xcassets and delete the AppIcon item.
So now, After that right-click and choose Import… Choose the icon set that you just created.
So That’s it.
Confirm that the icon was created by running the app in the simulator.
Conclusion:
So in this article, we have learned about How to Change the Application Launcher Icon.
Thanks for Reading!!!
Keep Learning!!! Keep Fluttering!!!
Do let us know if you need any assistance with Flutter Development? We would love to assist 🙂
FlutterAgency.com is our portal Platform dedicated to Flutter Technology and Flutter Developers. The portal is full of cool resources from Flutter like Flutter Widget Guide, Flutter Projects, Code libs and etc.
FlutterAgency.com is one of the most popular online portals dedicated to Flutter Technology and daily thousands of unique visitors come to this portal to enhance their knowledge of Flutter.