16.9 C
London
Friday, September 13, 2024

android – Flutter – Customizing Default Splash Display Picture


I have been attempting 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 outcome that i would like

right here is the picture that im getting

and that is the outcome 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 possibly can insert your individual picture property 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 fashion.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 -->
    <fashion title="LaunchTheme" dad or mum="@android:fashion/Theme.Mild.NoTitleBar">
        <!-- Present a splash display on the exercise. Mechanically eliminated when
             the Flutter engine attracts its first body -->
        <merchandise title="android:windowBackground">@drawable/launch_background</merchandise>
    </fashion>
    <!-- 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 just used beginning with V2 of Flutter's Android embedding. -->
    <fashion title="NormalTheme" dad or mum="@android:fashion/Theme.Mild.NoTitleBar">
        <merchandise title="android:windowBackground">@coloration/background_color</merchandise>
    </fashion>
</assets>

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

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

Latest news
Related news

LEAVE A REPLY

Please enter your comment!
Please enter your name here