Hello everyone, In this article, I will be discussing how we can update the app icon of your Flutter app.
To do this we are going to use
flutter_launcher_icons the plugin. It is a command-line tool that simplifies the task of updating your Flutter app's launcher icon.
- Add the
flutter_launcher_iconsdependency in your
Please be sure the check the latest version for the package from the link at the bottom.
dev_dependencies: flutter_launcher_icons: "^0.9.2"
2. Now add the configuration settings to your
flutter_icons: android: "launcher_icon" ios: true image_path: "assets/icon/icon.png"
You can also add this configuration in a different
yaml file instead of
pubspec.yaml file. But you must ensure that the other file will be in the same folder as the
Now fetch the dependencies
flutter pub get
flutter pub run flutter_launcher_icons:main
This will update the launcher icons for both android and ios as configured in
You can also update the icons using different configuration files using this command.
flutter pub run flutter_launcher_icons:main -f <your config file name here>
Configuration in details
flutter_launcher_icons configuration current I have used three options
- image_path - The location of the new icon.
Here android/ios both can have these values
- true - If set to true it will update the icon of the specified platform.
- false - If set false it will not update the icon of the specified platform.
- new_icon_path - If specified it will save the new icon according to this without removing the previous icon.
Other than this you can also specify the separate icon for both android and ios separately using these options
Note: iOS icons should fill the entire image and not contain transparent borders
For more details please go through the plugin page
I hope you had found this article informative. If you have any problems you can ask me in the comment section.