There are two ways Switch position can be changed in my app
-
Depending on the value of variable, it is changed its position by using
-
User can also toggle the switch and below function will be called.
But now the problem is when switch position is changed itself by variable values, then method 2 is also called. Is there any way to implement method 2 only when user toggle the switch