-
Notifications
You must be signed in to change notification settings - Fork 37
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Change Android Navigation Bar Color on System Dark Mode toggle #45
Comments
It turns out that I used
Now when the dark mode is toggled through the notification centre, the navigation bar color changes accordingly. |
@iamhx Glad you were able to make it work on your own. However, you don't need to register a listener. You can just set those properties if you can in your theme and let the package do its thing. |
@BirjuVachhani Thanks for the reply. In my
Setting those properties in my theme doesn't seem to change anything and I am not sure why. That is why I had to use Thank you for this great package. |
I am not sure but I think you have to set brightness as well. |
Brightness is deprecated |
Hey instead of this you can use the following |
When using
AdaptiveTheme.of(context).modeChangeNotifier.addListener
, I can change my android's navigation bar color like this:However, the navigation bar color does not change when I toggle dark mode from my Notification Centre. I tried finding a way to listen for platform brightness here by using
WidgetsBinding.instance.handlePlatformBrightnessChanged();
, but this would disable the dynamic theming of the app provided in your package (As I realised that I am probably overriding your code).Is there a way I can change the navigation bar color, when toggling dark mode from notification centre?
Example (Gif was too large to show here, sorry)
The text was updated successfully, but these errors were encountered: