So I wanted to make the switch to @AppStorage in my app but I'm troubled with a specific issue.
For the key of the @AppStorage I would like to use a variable that I already have but I can not do that but I used to find a way to do it with User Defaults as the following will show.
@State var isSignedUp = false
So I would initialise the User Defaults first as a @State var then in the .onAppear I would use the key as my id variable:
isSignedUp = UserDefaults.standard.bool(forKey: id)
What I am asking is how can I do this with @AppStorage?