Post

Replies

Boosts

Views

Created

Error: The compiler is unable to type-check this expression in reasonable time; try breaking up the expression into distinct sub-expressions.
Trying to figure out what is going on with this error. If you have a good idea with a missing space/character pls help me out! import Combine import SwiftUI struct barHome: View {       @State private var showingProgress = false   @State private var showingCourses = false   @State private var showingPath = false       var body: some View {     ZStack{               Rectangle()         .foregroundColor(.white)         .frame(width: 290, height: 75)         .cornerRadius(30)         .shadow(color: Color.black.opacity(0.2), radius: 10, x: 10, y: 10)         .shadow(color: Color.white.opacity(0.7), radius: 10, x: -5, y: -5)             HStack{               Spacer()               Button(action: { showingCourses.toggle() }) {         ZStack {           Circle().frame(width: 50, height: 50, alignment: .trailing)             .foregroundColor(.white)             .shadow(color: Color.black.opacity(0.2), radius: 10, x: 10, y: 10)             .shadow(color: Color.white.opacity(0.7), radius: 10, x: -5, y: -5)           Image("text.book.closed").resizable().frame(width: 25, height: 25, alignment: .trailing)             .foregroundColor(.black)             .font(Font.title.weight(.light))         }       }.sheet(isPresented: $showingCourses) {         Courses(showingCourseDetails: .constant(false), classes: mClasses)       }       .padding(.leading)       .padding(.leading)       .padding(.leading)       .padding(.top)       .padding(.top)       .padding(.bottom)               Spacer()                       Button(action: { showingPath.toggle() }) {         ZStack {           Circle().frame(width: 50, height: 50, alignment: .trailing).foregroundColor(.white)             .shadow(color: Color.black.opacity(0.2), radius: 10, x: 10, y: 10)             .shadow(color: Color.white.opacity(0.7), radius: 10, x: -5, y: -5)           Image("line.horizontal.3.decrease").resizable().frame(width: 25, height: 25, alignment: .trailing)             .foregroundColor(.black)             .font(Font.title.weight(.light))         }       }.sheet(isPresented: $showingPath) {         Path(classes: mClasses)       }       .padding(.top)       .padding(.top)       .padding(.bottom)       .padding(.bottom)               Spacer()               Button(action: { showingProgress.toggle() }) {         ZStack {           Circle()             .frame(width: 50, height: 50, alignment: .trailing).foregroundColor(.white)             .shadow(color: Color.black.opacity(0.2), radius: 10, x: 10, y: 10)             .shadow(color: Color.white.opacity(0.7), radius: 10, x: -5, y: -5)           ZStack{             Circle()               .stroke(lineWidth: 5.0)               .opacity(0.3)               .foregroundColor(Color.gray)             Circle()               .trim(from: 0.0, to: CGFloat(min(0.3, 1.0)))               .stroke(style: StrokeStyle(lineWidth: 5.0, lineCap: .square, lineJoin: .round))               .rotationEffect(Angle(degrees: 270.0))               .foregroundColor(Color.green)           }.frame(width: CGFloat(30), height: CGFloat(30))         }       }.sheet(isPresented: $showingProgress) {         Progress(classes: mClasses)       }       .padding(.trailing)       .padding(.trailing)       .padding(.trailing)       .padding(.top)       .padding(.top)       .padding(.bottom)       .padding(.bottom)               Spacer()       }     }   } } struct barHome_Previews: PreviewProvider {   static var previews: some View {     barHome()   } }
5
0
714
May ’21