[Android]
Is there any way I can read the current color and style information from the statusbar and navigationbar and save it to a variable?
I have no problems changing the statusbar and navigationbar values using SystemChrome, however I would like to save the current color settings to restore them when I return from a screen I navigated to.
SystemChrome.setSystemUIOverlayStyle(
SystemUiOverlayStyle(
statusBarColor: Colors.green,
systemNavigationBarColor: Colors.purple,
)
);
I have no success with the commands below:
print('+++ ${SystemUiOverlayStyle.dark.statusBarColor}');
print('+++ ${SystemUiOverlayStyle.dark.systemNavigationBarColor}');
print('+++ ${SystemUiOverlayStyle.light.statusBarColor}');
print('+++ ${SystemUiOverlayStyle.light.systemNavigationBarColor}');