I am trying to change the System Navigation Bar Color in my app with below code.
SystemChrome.setSystemUIOverlayStyle(SystemUiOverlayStyle(
systemNavigationBarColor: Colors.white,));
I am able to change it but when i navigate to other screen it changes back to its original color which is black and white color is not showing again unless i reload the app. How to fix it.
2
Answers
After flutter 3.1+ you can directly add navigation bar theme into your main themedata, but please check
useMaterial3 : true
property to use that themeInitialize that code at start in home page or where your app starts
this will apply it globally