I am developing an app with Flutter/Dart and GetX. I have a boolean variable named "obscureText". When this variable is true, specific text fields' inputs are all visible. When this variable is false, specific text field's inputs are all obscured. (like '*****'). What I want is that when user exits from app via home button or task mode, app is running on background right? When app enters background mode, i want "obscureText" variable to be false automaticly. How can i achieve that?
            Asked
            
        
        
            Active
            
        
            Viewed 102 times
        
    1 Answers
0
            
            
        You could use WidgetsBindingObserver to detect a change of AppLifecycleState and update your value when the state is paused.
        Stefan Galler
        
- 781
 - 4
 - 12
 
- 
                    Thank you for this advice but can you share a example code for this? For my situation. – beratmirzaloglu Nov 30 '21 at 08:24