The app itself builds and run properly.
Error message.
app crashed due to missing environment of type: TaskModel. To resolve this add .environmentObject(TaskModel(...)) to the appropriate preview.
My View with the #Preview macro looks like this.
struct CopyTaskListScreen: View {
@EnvironmentObject private var taskModel: TaskModel
var body: some View {
NavigationStack {
List(taskModel.tasks.sorted(by:
0 comments:
Post a Comment
Thanks