How can I get rid of the logo white background in splash screen Flutter?

45 Views Asked by At

I'm trying to get rid of this white background that appears around my logo. enter image description here

I was able to change the background from here 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/back_color"/>

    <!-- You can insert your own image assets here -->
    <item>
        <bitmap
            android:gravity="center"
            android:src="@drawable/logo"/>
    </item>
</layer-list>

but the image is showing white background even though the image in the asset has no white background. How can I remove this white background?

Note: I'm using Flutter in Android Studio

1

There are 1 best solutions below

7
Chamalka Gunawardana On

change it like this:

<?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="@android:color/white" />

    <!-- You can insert your own image assets here -->
    <item>
        <bitmap
            android:gravity="center"
            android:src="@drawable/logo" />
        
    </item>
    
    
    
    
    
</layer-list>