Contents
Outline
I try to develop an anpp with Flutter. In this blog post, I will show you how to change the App icons in Flutter.
To change the App icons, we need to generate the images for the Android and iOS, and configure them to each OS. However, if we use the flutter_launcher_icons
package, we can configure the App icon more simply.
Prepare image file
First, we need to prepare an image for the App icons. The image should meet the following conditions.
- PNG file
- more than 1024px x 1024px size
- 1024KB maximum file size
Store the prepared image to assets/images/app_icon.png
.
Install flutter_launcher_icons
To use the flutter_launcher_icons package, of course, we need to install the flutter_launcher_icons package.
Execute the command below to install the flutter_launcher_icons package.
flutter pub add flutter_launcher_icons --dev
Configure App icon
Next, we need to configure the image for the App icons. To configure flutter_launcher_icons
, create the flutter_launcher_icons.yaml
file, and modify it like the code below.
flutter_icons:
ios: true
android: true
image_path: "assets/images/app_icon.png"
remove_alpha_ios: true
Generate App icon
Execute the command below to generate the App icons via the flutter_launcher_icons package.
flutter pub run flutter_launcher_icons:main
Check
When you restart your Flutter project, you can see the App icon changed well like below.
Completed
Done! we’ve seen how to change the App icons in Flutter. You can change them simply when you use the flutter_launcher_icons
package!
Was my blog helpful? Please leave a comment at the bottom. it will be a great help to me!
App promotion
Deku
.Deku
created the applications with Flutter.If you have interested, please try to download them for free.