Post

Replies

Boosts

Views

Activity

Reply to No exact matches in reference to static method 'buildExpression'
Of course! The error occurs on the line that says .environmentObject(registrationViewModel) import SwiftUI struct ContentView: View { @StateObject var viewModel = ContentViewModel() @StateObject var registrationViewModel = RegistrationViewModel() var body: some View { Group { if viewModel.userSession == nil { LoginView() .environmentObject(registrationViewModel) } else if let currentUser = viewModel.currentUser { MainTabView(user: currentUser) } } } } struct ContentView_Previews: PreviewProvider { static var previews: some View { ContentView() } }
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Jul ’23
Reply to No exact matches in reference to static method 'buildExpression'
Ok. I posted It below so I was able to fit all the code in it.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Jul ’23
Reply to No exact matches in reference to static method 'buildExpression'
Of course! The error occurs on the line that says .environmentObject(registrationViewModel) import SwiftUI struct ContentView: View { @StateObject var viewModel = ContentViewModel() @StateObject var registrationViewModel = RegistrationViewModel() var body: some View { Group { if viewModel.userSession == nil { LoginView() .environmentObject(registrationViewModel) } else if let currentUser = viewModel.currentUser { MainTabView(user: currentUser) } } } } struct ContentView_Previews: PreviewProvider { static var previews: some View { ContentView() } }
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Jul ’23