Swiping to increase a Variable in SwiftUI

Hello ! I have a Swift project where I need a variable that is increased by 1 when I swipe up on it, and decreased by 1 when I swipe down. I've tried everything, but nothing works! Can anyone help? Thanks A LOT

Please show what you tried that doesn't work.

You should implement the increase / decrease in the gesture handler or in .onChanged.

But please, show code.

Swiping to increase a Variable in SwiftUI
 
 
Q