When giving the values directly, as in the first example (Ex.1), things are going correctly and there are no problems. But I built a class, put the values in it, and then called them as in the second example (Ex.2) to make the modification easier and more readable. A problem appears with me, which is:
The values are only modified when the application is restarted (I do not mean Hot Reload)
When you run the application for the first time in portrait mode, things work correctly, but when you make the application in landscape mode, the distances remain as they were in portrait mode, so I need to restart the application in landscape mode so that the distances are correct, and vice versa.
How do I make class directly record changes directly?
When giving the values directly, as in the first example (Ex.1), things are going correctly and there are no problems. But I built a class, put the values in it, and then called them as in the second example (Ex.2) to make the modification easier and more readable. A problem appears with me, which is:
The values are only modified when the application is restarted (I do not mean Hot Reload)
Direct use of it is like this. (Ex.1)
(Ex.2)
What happens to me:
When you run the application for the first time in portrait mode, things work correctly, but when you make the application in landscape mode, the distances remain as they were in portrait mode, so I need to restart the application in landscape mode so that the distances are correct, and vice versa.
How do I make class directly record changes directly?