iOS Development

android – Flutter – Customizing Default Splash Display Picture

Spread the love


I have been making an attempt to customise my splash display, however the picture that I am setting its having a white background as an alternative of mixing with the background

NOTE: i already tried to make use of solely the brand with out the form nevertheless it disappeared as a result of its white
NOTE: i attempted to make use of flutter_native_splash pkg however i did not get the end result that i need

right here is the picture that im getting

and that is the end result that i need to get

right here is my launch_background.xml

<?xml model="1.0" encoding="utf-8"?>
<!-- Modify this file to customise your launch splash display -->
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
    <merchandise android:drawable="@coloration/background_color" />

    <!-- You may insert your personal picture belongings right here -->
    <merchandise>
        <bitmap
            android:gravity="middle"
            android:src="@mipmap/launch_image"
            android:drawable="@coloration/background_color"  />
    </merchandise>
</layer-list>

and right here is the type.xml

<?xml model="1.0" encoding="utf-8"?>
<assets>
    <!-- Theme utilized to the Android Window whereas the method is beginning when the OS's Darkish Mode setting is off -->
    <type identify="LaunchTheme" guardian="@android:type/Theme.Gentle.NoTitleBar">
        <!-- Present a splash display on the exercise. Routinely eliminated when
             the Flutter engine attracts its first body -->
        <merchandise identify="android:windowBackground">@drawable/launch_background</merchandise>
    </type>
    <!-- Theme utilized to the Android Window as quickly as the method has began.
         This theme determines the colour of the Android Window whereas your
         Flutter UI initializes, in addition to behind your Flutter UI whereas its
         working.

         This Theme is barely used beginning with V2 of Flutter's Android embedding. -->
    <type identify="NormalTheme" guardian="@android:type/Theme.Gentle.NoTitleBar">
        <merchandise identify="android:windowBackground">@coloration/background_color</merchandise>
    </type>
</assets>

right here i made a file to set the background coloration coloration.xml

<?xml model ="1.0" encoding="utf-8"?>
<assets>
<coloration identify="background_color">#409CFF</coloration>
</assets>```

2 thoughts on “android – Flutter – Customizing Default Splash Display Picture

  1. I do believe all the ideas youve presented for your post They are really convincing and will certainly work Nonetheless the posts are too short for novices May just you please lengthen them a little from subsequent time Thanks for the post

Leave a Reply

Your email address will not be published. Required fields are marked *