This is (for me) a common initialisation issue in Swift. You aren't able to use properties to calculate other properties until the type is fully initialised – which it can't be as you're still allocating values.
AFAIK you have to either make those variables lazy (which then makes the struct mutate when you access those variables, which can be a pain) or you set them in an explicit initialiser.
Topic:
UI Frameworks
SubTopic:
SwiftUI
Tags: