So I am working on an app that will allow the users to create an account offline with some basic information such as name, designation etc. And I want the user to be able to use the app completely in offline. But also I want to keep an option to create an account with some authentication methods such social login, email, phone. Users can do this from their settings after they have created the account locally. And Once they create/connect the account I want to backup the data that is available locally to firebase database.
But I am confused which would be the most suitable approach for this. Should I use Sqflit or Shared Preference package for this.
Thanks for your help in advance.
Sharedpreferences is used to store simple key-value pairs while Sqlite is designed to store lots of similar data in a SQL database.
It has some limitations:
In your case, authentication data is critical and therefore I would not recommend using SharedPreferences.
If you want more information about the topic, have a look at the Flutter Cookbook for persisting data.
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