Currently I’m creating a user registration criteria and it have three registration pages. For each completion of user registration page I want to store it in local storage. If the user closes the app before the 3 level of registration, I want to show the entered details of completed pages without api calling.
So which is the best way of storing data locally in flutter like room database, shared preferences etc…
2
Answers
There are many options.I recommend you to use Flutter Secure storage or hive local database. For more info see the documentation. These have inbuilt encryption to secure data.
It depends on the data you want to store. There are several options from relation databases (sqlite) to key-value stores.
The easiest and best performing stores are
If you have complex Data to store and want the advantages of relational storage your primary options are
I think that in your case, Hive or ObjectBox would be best, as the data you are storing is quite simple and does not have many relationships. If you want to store relational data, I personally prefer Drift to Sqflite, as Drift has improved a lot recently.
Of course, there are the secure storage and shared preferences, which should only contain very loose and simple data.