0

Splash Screen

How change the navigation bar color of the splash screen ? I'm using flutter_native_splash: ^2.2.7

I want the status bar color to be like color #e8472d

ThomasF
  • 147
  • 1
  • 11
  • how is it possible that your splash screen shows a navbar? if the navbar already appears, I think the flutter app has finished initilize and move to your home screen? – pmatatias Aug 03 '22 at 09:54
  • Does this answer your question? [How to change status bar color of native splash screen in flutter?](https://stackoverflow.com/questions/72471785/how-to-change-status-bar-color-of-native-splash-screen-in-flutter) – Aniruddh Parihar Aug 03 '22 at 10:27

1 Answers1

0

You can create a custom SystemUiOverlayStyle using the default constructor. The color of the system nav bar is defined there. But to avoid setting a lot of null values, use the copyWith method to update the values from an existing light/dark theme.

const mySystemTheme= SystemUiOverlayStyle.light
 .copyWith(systemNavigationBarColor: Colors.red);

You can imperatively set the system nav color using the SystemChrome static methods.

SystemChrome.setSystemUiOverlayStyle(mySystemTheme);