struct SettingsView: View {
var body: some View {
welcomeView()
//:Missing argument for parameter 'currentAuthStat' in call
}
}
struct welcomeView: View {
@Binding var currentAuthStat: UNNotificationSetting
var body: some View {
explanatoryText
}
private var explanatoryText: Text {
let explanatoryText: Text
switch currentAuthStat {
case .enabled:
explanatoryText = Text("Notifications are enabled")
+ Text(Image(systemName: "checkmark"))
default:
explanatoryText = Text("Notifications disabled ")
+ Text(Image(systemName: "x.squareroot"))
}
return explanatoryText
}//: explanatoryText
}
when I try to display welcomeView() in the SettingsView I get the error "Missing argument for parameter 'currentAuthStat' in call" I tried adding @State var to SettingsView but then it gives me an error to make the call in ContentView and when I add it to ContentView it wants me to add that in the App{} @main page and then I get an error app does does not conform to View().
How can I pass this explanatoryText to another view?