+ 2
Does anyone know how to keep the user logged in in flutter?
In my flutter app when i exit from the app without logging out it is restarted from login screen. How can i implement the functionality to keep the user logged in when user exits the app without logging out. The app should start from user activity screen instead of login screen. Just like fb and instagram.(They do not ask you to login again when you exit without logging out)
2 Answers
+ 5
you can do this kind of things using shared prefrence.
save any bool variable in prefrence like islogin. And then when app lunch check that prefrence if user already login then set user activitys othewise set login
0
Mirielle[Inactive] i have already implemented the sign out and sign in functionality through cloud firestore. My app is almost completed. I just want to keep the user logged in even after exiting the app. I have already done all the email, password authentication etc.