+ 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)

26th Apr 2020, 9:56 PM
Zain Ul Abideen
Zain Ul Abideen - avatar
5 Respostas
+ 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
9th May 2020, 7:03 PM
sagar patel
sagar patel - avatar
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.
26th Apr 2020, 10:54 PM
Zain Ul Abideen
Zain Ul Abideen - avatar