0

[New to Flutter/Android/Mobile]

DATA STORAGE

I see apps where you can create lists etc. without logging in to the app. For example, a shopping list app...you can create new shopping lists, add items to the list and those lists/items will persist over sessions, even if the app is stopped and restarted.

Where is this data stored? You experienced Flutter/mobile developers out there, where do you store data like this? In the phone? If so what is your preferred approach? Or perhaps you never store in the phone but always write to some external storage (if so what is your choice for ease of use)?

I'm not talking about sensitive data like bank details etc.

Just trying to get a feel from experienced devs about best practises when it comes to storing data for things like simple lists etc or other user prefs. Thanks.

Lord Null
  • 856
  • 1
  • 9
  • 20
  • Voted back up. I think this is a reasonable question. I think there are a couple of aspects. One persisting data between say a click on the back button, then running the app again. Then persisting data permanently (maybe looking at firebase/store or storing in a file, or preferences). I'm a bit unsure of the first one, so can't answer that unfortunately, but maybe someone else can. – Ian Dec 15 '18 at 15:32
  • Btw this may be helpful https://stackoverflow.com/questions/41369633/how-can-i-save-to-local-storage-using-flutter/50849802#50849802 and could mark this question as a duplicate possibly of that ? – Ian Dec 15 '18 at 15:41
  • yes, I think that Ian's link answers this question.. as per me, `firebase` is the standard place where I store data, eventually I use `shared_preferences` for small configs. – Feu Dec 15 '18 at 18:09
  • Thanks @Ian I thought it was a reasonable question too -- not every question has to have a splurge of code. Thanks for that link, it helps. I don't think my question is fully a duplicate...not only was I asking about how to do storage, but in addition I was asking for feedback from experienced devs who probably have some useful feedback about this subject and about what works best and pitfalls to avoid. I think more of this kind of question should be asked on SO as it would benefit the many learners out there and help them to create better apps. – Lord Null Dec 16 '18 at 10:07

0 Answers0