I'm trying to create a page that shows the detail view of an exercise so i passed in a binding variable exercisePlan but the previews say that it cannot ding $exercisePlan in scope even though it is already declared on top. I'm probably missing something but I'm not sure what.
`
import SwiftUI
struct ExercisePlanDetailView: View {
@Binding var exercisePlan: ExercisePlan
var body: some View {
VStack {
Text(exercisePlan.title)
}
}
}
struct ExercisePlanDetailView_Previews: PreviewProvider {
static var previews: some View {
ExercisePlanDetailView(exercisePlan: $exercisePlan)
}
}
`