Hello Jackson-G
Thank you for your soon answer.
I tried to adapt your example for UserDefaults. But I could not find a predefined KeyPath for UserDefaults.
In the documentation of EnvironmentValues I could find Locale (which you use in your example), but I could not find a KeyPath for UserDefaults.
Have you maybe a code snippet of your example, which works with UserDefaults?
Here's the documentation I mentioned above: https://developer.apple.com/documentation/swiftui/environmentvalues.
Topic:
UI Frameworks
SubTopic:
SwiftUI
Tags: