Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Plugin: Key-value pair storage #4757

Closed
arxenix opened this issue Jun 25, 2016 · 11 comments
Closed

Plugin: Key-value pair storage #4757

arxenix opened this issue Jun 25, 2016 · 11 comments
Assignees
Labels
c: new feature Nothing broken; request for a new capability customer: posse (eap)

Comments

@arxenix
Copy link

arxenix commented Jun 25, 2016

Flutter should have a simple Key-value Pair storage api, similar to Android's SharedPreferences or iOS's NSUserDefaults. Saving and loading data is extremely important for applications and I shouldn't have to go through the hassle of creating, writing to, and loading a file just to save some simple key Value pairs.

@Hixie
Copy link
Contributor

Hixie commented Jun 25, 2016

We are thinking of making PageStorage into a persistent storage of this kind.

@sethladd sethladd added the c: new feature Nothing broken; request for a new capability label Jul 11, 2016
@Hixie Hixie modified the milestone: Flutter 1.0 Sep 12, 2016
@olostan
Copy link

olostan commented Nov 17, 2016

@Hixie sometimes there is need of "cross-page" storage, and PageStorage is bound to some navigation point (page) if I understand it correctly. Would be nice to have some persistent global app storage, not just for page, like LocalStorage for web apps.

@Hixie Hixie modified the milestones: 6: Future Future, 5: Make Hixie proud Jan 31, 2017
@Hixie Hixie added the plugin label Jan 31, 2017
@mit-mit mit-mit changed the title Key-value Pair storage Plugin: Key-value pair storage Feb 2, 2017
@xster
Copy link
Member

xster commented Feb 16, 2017

@mit-mit, would also support including this as an out of the box plugin in the MVP. Anyone implementing any app with some sort of login (probably a large share of the market) will need this and the alternative (spinning their own) is a lot of non-trivial non-value-add code.

@xster xster modified the milestones: 2: Make Early Adopters happy, 6: Future Future Feb 16, 2017
@eseidelGoogle
Copy link
Contributor

This is a frequently requested plugin. :) Posse just asked if we had one.

@lukef
Copy link
Contributor

lukef commented Apr 7, 2017

We have a working, pure dart concept for this if you are interested. The only thing that it doesn't cover (out of scope for us) was encryption of the values (similar to secure storage on NSUserDefaults & SharedPreferences). I would think that for that protection level you'd want to fallback to a plugin.

@eseidelGoogle
Copy link
Contributor

There are other "platform-integration" aspects of sitting on top of NSUserDefaults and SharedPreferences in terms of behaving correctly with regards to preference synchronization, etc.

@xster
Copy link
Member

xster commented Apr 7, 2017

Supporting some synergies with preferences cloud functions would indeed be really cool
https://developer.android.com/guide/topics/data/autobackup.html
https://developer.apple.com/library/content/documentation/Cocoa/Conceptual/UserDefaults/StoringPreferenceDatainiCloud/StoringPreferenceDatainiCloud.html

@eseidelGoogle eseidelGoogle modified the milestones: 3: Make conferences happy, 2: Make Early Adopters happy Apr 11, 2017
@eseidelGoogle
Copy link
Contributor

We got another request for this today. I believe we may have some SharedPreferences/NSUserDefaults code from internal Flutter customers we could share here. I've asked @collinjackson to investigate.

@lakexyde
Copy link

Try this: https://github.com/lakexyde/flutter_localstorage. Just needed a simple way to store key-value, so I created this.
Hope you find it helpful.

@xyzbilal
Copy link

Try this: https://github.com/lakexyde/flutter_localstorage. Just needed a simple way to store key-value, so I created this.
Hope you find it helpful.

looks promising. thanks for your effort

@github-actions
Copy link

This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 31, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
c: new feature Nothing broken; request for a new capability customer: posse (eap)
Projects
None yet
Development

No branches or pull requests