jonbhanson / flutter_native_splash

Automatically generates native code for adding splash screens in Android and iOS. Customize with specific platform, background color and splash image.
https://pub.dev/packages/flutter_native_splash
MIT License
1.35k stars 214 forks source link

Android 14 does not display the startup page for the first time #710

Open parshvas1515 opened 4 months ago

parshvas1515 commented 4 months ago

Hello

flutter_native_splash:
  color: "#FFFFFF"
  image: assets/image/ic_splash_icon_new.png
  color_dark: "#FFFFFF"
  image_dark: assets/image/ic_splash_icon_new.png
  android_gravity: center
  android: true
  ios: true
  image_ios: assets/image/logo.png
  image_dark_ios: assets/image/logo.png
  web: false
  android_12:
    color_dark: "#FFFFFF"
    icon_background_color: "#FFFFFF"
    image: assets/image/ic_splash_icon_new.png

_Originally posted by @parshvas1515 in https://github.com/jonbhanson/flutter_native_splash/issues/521#issuecomment-2185725881_

Bojan227 commented 2 months ago

Same here, im using firebase app distribution in order to test the app but after the first installation the splash logo doesn't appear, it's just the background color.

flutter_native_splash:
  image: "assets/images/android12splash.png"
  color: "#4308B5"
  android: true
  fullscreen: false
  ios: true
  web: false
  android_12:
    image: "assets/images/android12splash.png"
    color: "#4308B5"

style.xml

<?xml version="1.0" encoding="utf-8"?>
<resources>
    <!-- Theme applied to the Android Window while the process is starting when the OS's Dark Mode setting is off -->
    <style name="LaunchTheme" parent="@android:style/Theme.Light.NoTitleBar">
        <item name="android:windowBackground">"@drawable/gradient_background"</item>
        <item name="android:forceDarkAllowed">false</item>
        <item name="android:windowFullscreen">false</item>
        <item name="android:windowDrawsSystemBarBackgrounds">false</item>
        <item name="android:windowLayoutInDisplayCutoutMode">shortEdges</item>
        <item name="android:windowSplashScreenBackground">#4308B5</item>
        <item name="android:windowSplashScreenAnimatedIcon">@drawable/android12splash</item>
    </style>
    <!-- Theme applied to the Android Window as soon as the process has started.
         This theme determines the color of the Android Window while your
         Flutter UI initializes, as well as behind your Flutter UI while its
         running.

         This Theme is only used starting with V2 of Flutter's Android embedding. -->
    <style name="NormalTheme" parent="@android:style/Theme.Light.NoTitleBar">
        <item name="android:windowBackground">"@drawable/gradient_background"</item>
    </style>
</resources>