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
App theme doesn't update if app is started while the system was in dark mode #32
Comments
I have the same error, any solution ? |
same problem |
Same here, anyone got a fix? |
I have released a fix for system theme change not being detected. Please try |
same issue, app theme doesn't update if app is started while the system was in dark mode. only work when the app is started while system not in dark mode |
That's strange. I also do have Oneplus Nord CE with Android 11 and when I start my app while system is in dart mode, it works fine for me. Checkout this part of the docs where the mode is retrieved from storage before loading the app. Maybe this can fix your issue but I am not sure. To help me reproduce this, could you please create an example app with the same issue and provide exact steps to reproduce? (like does it happen on first run or second run?) At least post the exact code here. |
yes you are right, i think there is something wrong in my project, because when i create new project and using the same |
@gnassro I thought so. Please check your configuration and make sure you're not changing theme explicitly from somewhere. |
@erwangse Does the latest release work for you? |
I discovered that the problem because of using this package https://pub.dev/packages/preload_page_view. when i replace it with the default Widget, it work fine |
@gnassro Ah! I think that package caches widgets so those widgets are not updated when the theme is changed. Although this is not a solution, can you try setting the |
@BirjuVachhani i tried, but same issue, i think i need to change this package. thanks |
Closing this issue as it seems to be fixed. Feel free to reopen if it does work for some reason. |
Hi there, just wanted to make a quick follow-up and add a bit of context to this ! |
Describe the bug
App theme doesn't update if the app is started while the system was in dark mode.
I have only tested this on an Android 11 phone, the Oneplus Nord.
The code
Environment
Additional info
I've noticed that, if I change the system from light/dark mode when the theme isn't updating, I don't even get a log message in my
flutter run
session. I do get logs notifying a theme change when I start the app when the system is in light mode, however.So far I don't know if the issue is with my code or your package, I'll be very grateful if you could help me on this.
Note that the issue appears regardless if the app is in release or debug mode.
The text was updated successfully, but these errors were encountered: