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.29k stars 202 forks source link

[Question] Using same icon for light and dark mode results in icon darker for dark mode. #446

Closed TaylorHo closed 1 year ago

TaylorHo commented 1 year ago

Hi,

I'm using the same icon for light mode and dark mode.

When the mobile device is in light mode, tha splash screen is with radiant colors. When the mobile device is in dark mode, the splash screen is a lot darker than the light one.

Why, if it's the same icon and background color?

Should I specify a configuration for dark and light modes, even if the splash screen will be the same?

jonbhanson commented 1 year ago

Please include 1. your config 2. screen captures of the splash in light and dark modes and 3. your source images.

TaylorHo commented 1 year ago

Hello, of course. Here:

1. Configuration

flutter_native_splash:
  color: "#6558f5"
  image: assets/icon/icon-foreground.png
  web: false

2. Screen Captures

The darker one was taken with the device in Dark Mode

3. Source files

Icon placed at assets/icon/icon-foreground.png icon-foreground

jonbhanson commented 1 year ago

This package is not able to do what you are seeing. You have only supplied one color and one image, so those are all this package has to work work with. It doesn't do anything like modifying the color or image tint. I think your phone must be applying a filter to the colors to produce this effect.

TaylorHo commented 1 year ago

Yes, even using a specific color for dark mode (which is the same background and image color as light mode), the device is applying this "dark" overlay. This could be an OS issue (since I am using Xiaomi MIUI OS).

Do you know of a workaround to change this behavior?

jonbhanson commented 1 year ago

Sorry, I haven't used the Xiaomi MIUI OS. I will close this ticket since the problem isn't related to this package.

hasanm08 commented 2 months ago

did you try this? https://stackoverflow.com/questions/69812590/android-12-splash-screen-icon-not-displaying/69826671#69826671 I tried but had some issues with adding androidx.core:core-splashscreen in gradle please notify me on any update @jonbhanson @TaylorHo