I would like to put a condition to the NavigationLink.
I have two variable, and the NavigationLink as below.
@State var score = 0
@State var target = 10
NavigationLink(destination: level2()) {
Text("Next Level")
}
Is there a way to let the user go to the next level if the score is bigger than the target?
Thanks.