I decided to do it with an dependency injection, since i couldnt get your version to work. Though i think that was a problem on my part and not on yours :D.
Topic:
UI Frameworks
SubTopic:
SwiftUI
Tags: