Hello,
i am trying to change the value of a variable (called dowweights.apu) in an if statement but I get error: Type ‘()’ cannot conform to ‘View’
The variable dowweights.apu is at first declared to 0 and now I want to declare it to 250.
Do I need a function or is my syntax wrong ?
@ObservedObject var dowweights = DowWeights(apu: 0)
if (firestoreManager.checkmarkapu == true) {
self.dowweights.apu = 250 // I am trying to set a new value to the variable "apu" } else { firestoreManager.updateStatecheckmarkapu(checkmarkapu: false) }