I have followed the sign in and cloud variables tutorials and seen multiple threads for my project involving storing a username for a particular user. I have a firebase database connected to my project as well and initialized the userID variable. However, the cloud variable is only saving while I am staying on the same screen. When I go to a new screen, the data suddenly goes back to null. Below are screenshots of my code.
What should I do?