Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What are my options for storing data when using Flutter? (iOS and Android) [closed]

I am still new to the Flutter environment and find it hard to find information about storage options when building an app with Flutter.

Similarly to what has been asked for react native, I would like to know what my options are with respects to

  • Data persistence
  • Remote or locale
  • Offline behavior (if applicable)
  • Database security
  • App performance
  • Pricing
  • Real time sync
  • Compatibility with third party libraries, and Flutter modules
  • Anything else...

I have searched the flutter packages for database but did not find it so helpful. Any answer, guide and reference would be much appreciated.

like image 529
7hibault Avatar asked Jul 10 '18 16:07

7hibault


People also ask

How do you store user information in Flutter?

Set an instance variable of Shared Preferences and store the value with a key identifier. Any time you want to retrieve the value when the app starts, just get it using the key. See example below of setting and getting a stored username.


1 Answers

I have one opensource project on GitHub make sure to check out -

A flutter project with Implementation of a Contacts app in 4 ways (API, Custom, Preferences and Sqflite).

In this Sample Project, there are 4 ways which I have used to store data in flutter which are as follows -

  1. REST API ->  (You can store your Data on Server and Perform CRUD Operations with REST APIs)
    HTTP Package for REST APIs Integration in Flutter

  2. Preferences ->   (Store your Data in Shared Preferences)
    Shared Preferences Package in Flutter

  3. Sqlite ->   (Store your Data in SQLite Database)
    Sqflite Package in Flutter

  4. Custom ->   (Store your Data in temporary objects but it will only be accessible during app runtime)

like image 62
Harsh Sharma Avatar answered Oct 14 '22 16:10

Harsh Sharma