I managed to use the values that should be saved on user defaults in my code snippet above from a call site other than a SwiftUI View by creating a static shared (singleton) instance on SettingKeys class and access the required key directly: SettingKeys.shared.colorScheme
Topic:
UI Frameworks
SubTopic:
SwiftUI
Tags: