Set dark mode to interface style in Widget Extension

I'd like to override the style of the widget so that my user's preference of dark mode in the app can also apply in the widget.

In the main SwiftUI app I can use:
Code Block
SceneDelegate.shared?.window!.overrideUserInterfaceStyle = .dark

But I'm not sure how to use that within the Widget extension. Yes I could define alternative for every single color and piece of text, but even things like the widget system background change with light/dark mode all of which I've have to try to check for and adjust.

If I can override the user interface style, my widget would adjust automatically.
Any luck with this one? I'm looking to do the same thing, haven't found any documentation about it 🙏
Nope. I'm considering opening a TSI but really don't want to waste it if the response is just "This feature is not currently available, please file an enhancement request".
Set dark mode to interface style in Widget Extension
 
 
Q