2

In my App the user can change between dark and white theme at any time in the settings. After restarting the app, the settings are loaded to evaluate if the user uses the dark mode. If so, I want to have a dark background color on the native android splash screen.

Is there a way to change the native android splash screen color during runtime - for the next start? I've seen this question, but still no solution.

The problem is not to set the splash screen! I know this can be done by using this package or by simple steps in the android folder.

C4s4r
  • 404
  • 3
  • 7
  • For this, you have to store the user's preferences data somewhere either in local storage or in firebase. Later when you reload the app, you can check the data saved to know about the user's preferences. – Chetan Goyal Jun 21 '20 at 20:43
  • @HarshAggarwal I'm already saving and loading the settings. For example: I'm able to show a custom splash screen with the right color, based on the selected theme. But I'm trying to work with the native android splash screen to get rid of the blank white screen that is shown before runApp() – C4s4r Jun 21 '20 at 20:54
  • Does this answer your question? [Flutter app on start it is showing white screen for few second](https://stackoverflow.com/questions/56168832/flutter-app-on-start-it-is-showing-white-screen-for-few-second) – Chetan Goyal Jun 21 '20 at 21:23
  • This Problem is already solved here- https://stackoverflow.com/questions/56168832/flutter-app-on-start-it-is-showing-white-screen-for-few-second – Chetan Goyal Jun 21 '20 at 21:23
  • Your linked question only shows how to add a native splash screen for a Flutter project. But I'm asking if and how it's possible to change the background color of the native splash screen during runtime - for example when the user turns on dark mode in the app settings -> the app should reload with dark background on the splash screen when restart – C4s4r Jun 21 '20 at 21:50
  • 1
    I don't think that we can actually do comparisons in Android Manifest. There should be some other approach for it. – Chetan Goyal Jun 21 '20 at 21:57

0 Answers0