The app launch icon is the icon that appears on our device's home screen when we launch our app. It is a great way to brand and makes our app stand out.
We can follow the instructions given below to change the application launch icon.
To generate different-sized icons for both Android and iOS simultaneously, we can follow these steps.
Visit the website App Icon.
Upload our icon image by clicking the "Upload your app icon" button.
Tick the iPhone and Android options checkboxes to generate icons for both platforms.
Click on the Generate
button, and this website will automatically create different-sized icons for Android and iOS.
It will generate a zip folder named AppIcons
with android
, Assets.xcassets
named folders, app store, and Play Store icons.
To update the app icon in the Android platform of our Flutter project, we can follow these steps.
We can open our Flutter project in our preferred code editor or IDE.
Locate the android/app/src/main/res
directory within our project.
Inside the res
directory, we will find multiple mipmap-*
folders.
Replace these mipmap-*
folders with the corresponding mipmap-*
folders from the downloaded AppIcons zip file.
Once we have replaced the folders, the new app icon resources will be in place for the Android platform.
To update the app icon in the iOS platform of our Flutter project, follow these steps.
Navigate to the ios/Runner/
directory in our Flutter project.
Locate the Assets.xcassets
folder within the Runner
directory.
Delete the existing Assets.xcassets
folder.
Now, open the folder where we have downloaded the new app icon assets (let's assume it's named AppIcon
).
Copy the Assets.xcassets
folder from the AppIcon
folder.
Paste the copied Assets.xcassets
folder into the ios/Runner/
directory of our Flutter project.
After replacing the icons, we need to update the configuration files in our Flutter project to reference the new icons.
For Android: Open the android/app/src/main/AndroidManifest.xml
file and locate the <application>
tag. Add or modify the android:icon
attribute inside it to specify the path to our custom app icon. For example:
<application
android:label="exampleapp"
android:name="${applicationName}"
android:icon="@mipmap/ic_launcher">
Note: Replace ic_launcher
with the name of our custom icon file (without the file extension).
For iOS: Open the ios/Runner/Info.plist
file and locate the <key>CFBundleIcons</key>
section. If not found, create one. Inside it, update the CFBundlePrimaryIcon
and CFBundleIconFiles
entries to reference our custom app icon file names. For example:
<key>CFBundleIcons</key>
<dict>
<key>CFBundlePrimaryIcon</key>
<dict>
<key>CFBundleIconFiles</key>
<array>
<string>ic_launcher</string>
</array>
</dict>
</dict>
After making the necessary changes, we must test our app to ensure the custom app launch icon is displayed correctly. For that, we can run the following command:
flutter run
Note: It is recommended to perform a clean build (flutter clean
) and restart your IDE to ensure that the changes are applied correctly.
We can easily customize the app launch icon in your Flutter application by following the provided steps. This allows us to create a unique and visually appealing brand identity, enhancing the user experience from the moment they install and open your app.
Free Resources