Thanks and of course you're absolutely right, Shimizu. Unfortunately my full app already has this line up the hierarchy - I accidentally missed it out while writing this example code). Annoyingly the the test code above does work when I include it but the full app code doesn't, delivering the same error about the absence of an environment object up the hierarchy.
Topic:
UI Frameworks
SubTopic:
SwiftUI
Tags: