Even if you could get it to work, I think you would get an error for accessing a @State variable outside the body of the view.
Even if you could get it to work, I think you would get an error for accessing a @State variable outside the body of the view.