How can I store login information using flutter?
I'm trying to create two pages login page and home page.
once the user logged in I want to store the information so next time they run the application they automatically redirect to the home page.
First things first open up your Android Studio and Create a new Flutter project, and give it any name you want. Make sure you have 4 dart files in your lib folder. After opening your firebase console click on add/start a new project. You can give your project any name you wish and hit continue.
Remember that something like login information is "Sensitive information!" and should be stored securely! Shared preferences might not be a good idea to store sensitive data! So you can use the flutter_secure_storage to store login data!
Just for note:
flutter_secure_storage
A Flutter plugin to store data in secure storage:
Keychain is used for iOS
AES encryption is used for Android. AES secret key is encrypted with RSA and RSA key is stored in KeyStore
Note KeyStore was introduced in Android 4.3 (API level 18). The plugin wouldn't work for earlier versions.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With