Splash screen icon and color in Flutter

In this code example, we are going to show how you can change or add icon and color to the launcher or splash screen in Flutter.

First, create a file at the location - android/app/src/main/res/values/colors.xml

<?xml version="1.0" encoding="utf-8"?>
  <color name="bg_color">#6023e0</color>

Edit the code in the file - android/app/src/main/res/drawable/launch_background.xml

<?xml version="1.0" encoding="utf-8"?>
<!-- Modify this file to customize your launch splash screen -->
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
    <item android:drawable="@color/bg_color" />

    <!-- You can insert your own image assets here -->
    <!-- <item>
            android:src="@mipmap/launch_image" />
    </item> -->

For Android API Level 21 or higher

If you are using Android API level 21 or higher, Also make the changes in drawable-v21/launch_background.xml.

Was this helpful?