0
votes

So im trying to display a custom splash screen image in my flutter app.But for some reason the background color as well and the custom image are not showing up

path where I am editing 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="@android:color/white" />

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

enter image description here

enter image description here

No matter how may times I try its not changing ,I'm a newbie to flutter any guidance will be really helpful

1
Following the above link, Any idea why the current setup is not working ? - nick bellavi

1 Answers

0
votes

you should try with this

<item
        android:height="200dp"
        android:drawable="@drawable/splash"
        android:gravity="center" />

That's work for me.