-
-
Notifications
You must be signed in to change notification settings - Fork 65
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
[FREQ] Problems with using @Environment(\.colorScheme) var colorScheme
#148
Comments
Hey @Kejiasir, Thanks for sharing this issue. I don't use @Environment values, so I wasn't aware of this problem. I'll try to solve it over the weekend and get back to you with a solution (hopefully). PS. If you have some spare time, could you confirm that the problem exists in the latest framework version (3.0.0)? Thanks for your help! |
Hi @FulcrumOne, thank you for your reply, and thank you for open-sourcing this excellent framework. I am currently using version 2.7.1, so I haven't had time to confirm whether this problem exists in version 3.0.0. |
Hey @Kejiasir I found a way to fix it. I'll implement it this week, till Friday probably. |
Wow @FulcrumOne Great, thank you very much. |
Hey @Kejiasir, Quick update - this is a bit more complicated than I initially thought. The problem is that I've implemented it in such a way that the I'm currently considering moving the method to a Another idea is to put Config as a I'll try my best to finish the task this week. Have a nice day, |
@Environment(\.colorScheme) var colorScheme
@Environment(\.colorScheme) var colorScheme
@Environment(\.colorScheme) var colorScheme
@Environment(\.colorScheme) var colorScheme
When using
@Environment(\.colorScheme) var colorScheme
, Xcode prompts:Accessing Environment<ColorScheme>'s value outside of being installed on a View. This will always read the default value and will not update.
Sample code:
As Xcode suggests, it is not possible to change colors based on a
colorScheme
.Is there a way to fix this?
The text was updated successfully, but these errors were encountered: