Hello everyone please give me idea to solve this issue just adding item to cart
using count += 1 and count -= 1
Button(action: {count += 1} ){
Image(systemName: "plus")
.foregroundColor(.gray)
.frame(width: 35, height: 35)
.background(RoundedRectangle(cornerRadius: 17.5).stroke(Color.gray,lineWidth: 1)) }
Error -> Left side of mutating operator isn't mutable: 'self' is immutable
using count += 1 and count -= 1
Button(action: {count += 1} ){
Image(systemName: "plus")
.foregroundColor(.gray)
.frame(width: 35, height: 35)
.background(RoundedRectangle(cornerRadius: 17.5).stroke(Color.gray,lineWidth: 1)) }
Error -> Left side of mutating operator isn't mutable: 'self' is immutable