-
Notifications
You must be signed in to change notification settings - Fork 173
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
Material Dark Theme Overrides Cupertino Dark Theme on iOS #420
Comments
What version of the package are you using. There was a fix around this area with v3.3.4. See #402 |
Thats the version Im using: |
Still happens using version 7.0.1. Currently I fixed this using this function when creating the app:
Then construct with:
With this, the app uses the system theme and adapts to the device theme system setting if changed. Noticed that if not defined the values it always uses the Light mode by default. But I think all the setting the ThemeMode.system and setting manually the system light and dark mode should be made by default by the PlatformTheme by its own. This can be achieved in a single call with something like this:
Then just:
Hope this helps. |
Hello,
I've encountered an issue when using both the Material dark theme and Cupertino dark theme simultaneously on iOS. Specifically, the Material dark theme appears to override
the Cupertino dark theme, as shown in the attached screenshot
Here's a snippet of the relevant code:
In this setup, the primary color should be red. However, as demonstrated in the screenshot, this is not the case. This issue does not occur on Android, nor does it occur with the light mode themes where the Cupertino theme isn't overridden by the Material theme.
The only workaround I've found is to conditionally set the Material dark theme to null on iOS, as shown in the following code snippet:
This workaround allows the Cupertino dark theme to render correctly:
Any guidance or suggestions for addressing this issue would be greatly appreciated, thanks!
The text was updated successfully, but these errors were encountered: