Whether it’s On Android or iOS, the premise of changing an icon is to scale the icon well.

1. Change the APP icon

The android platform:

The Android APP icon is placed in the mipMap path and the default name is IC_Launcher. To change the Android APP icon, you need to rename the new icon to IC_launcher. PNG and replace the default icon under the mipMap path resolution.

For IOS: In the root directory of your Flutter project, navigate to… / ios/Runner. Assets in the directory. Xcassets/AppIcon. Appiconset already contains a placeholder images. Simply replace them with images of the appropriate size. Keep the original file name.

2. Change the startup icon

The Android platform:

Go to the android-drawable directory launch-background. XML, comment out the first item that is opened by default, and enable the new item to configure custom drawable.

<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
    <! -- 1 <item android:drawable="@android:color/black" /> -->

    <! -- 2 You can insert your own image assets here -->
    <item>
        <bitmap
            android:gravity="center"
            android:drawable="@mipmap/ic_launcher" />
    </item>
    
</layer-list>
Copy the code

IOS:

Navigate to… / ios/Runner. In Assets. Xcassets/LaunchImage. Imageset, into images, and named the images LaunchImage. PNG, [email protected], [email protected]. If you use a different file name, you must also update the contents. json file in the same directory.