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

[shared_preferences] Add Linux support #41720

Closed
stuartmorgan opened this issue Oct 1, 2019 · 4 comments · Fixed by flutter/plugins#2864
Closed

[shared_preferences] Add Linux support #41720

stuartmorgan opened this issue Oct 1, 2019 · 4 comments · Fixed by flutter/plugins#2864
Assignees
Labels
a: desktop Running on desktop good first issue Relatively approachable for first-time contributors p: shared_preferences Plugin to read and write Shared Preferences P2 Important issues not at the top of the work list package flutter/packages repository. See also p: labels. platform-linux Building on or for Linux specifically

Comments

@stuartmorgan
Copy link
Contributor

This is a common plugin, so we should support it on desktop. We'll need to decide on what conventions we want to use for Linux for the location, since there's not necessarily an OS standard.

For the actual storage, JSON is probably the easiest option to minimize dependencies (vs. something like SQLite).

@stuartmorgan stuartmorgan added plugin platform-linux Building on or for Linux specifically p: shared_preferences Plugin to read and write Shared Preferences a: desktop Running on desktop labels Oct 1, 2019
@stuartmorgan stuartmorgan added this to To do in Linux Preview via automation Mar 3, 2020
@robert-ancell
Copy link
Contributor

robert-ancell commented Mar 3, 2020

The standard place for this is specified in the XDG Base Directory specification. Simply, it's in ~/.config/<appname> or use the environment variable $XDG_DATA_HOME/<appname> if specified.

@stuartmorgan
Copy link
Contributor Author

Blocked on #55327. Once that's done we can do this as a Dart-only "plugin" using almost identical Dart code to the Windows version that has a pending PR.

@stuartmorgan
Copy link
Contributor Author

The blocking bug is resolved, and a Dart-only path_provider_linux landed. Implementing this would just involve combining the JSON code from the Windows PR with the location lookup using XDG as in path_provider_linux.

@stuartmorgan stuartmorgan added the good first issue Relatively approachable for first-time contributors label Jun 3, 2020
@stuartmorgan stuartmorgan added the P2 Important issues not at the top of the work list label Jun 9, 2020
@stuartmorgan stuartmorgan added this to the 1.21 - July 2020 milestone Jun 9, 2020
@robert-ancell robert-ancell moved this from To do to In progress in Linux Preview Jun 10, 2020
robert-ancell added a commit to robert-ancell/plugins that referenced this issue Jun 16, 2020
robert-ancell added a commit to robert-ancell/plugins that referenced this issue Jun 17, 2020
robert-ancell added a commit to robert-ancell/plugins that referenced this issue Jun 18, 2020
robert-ancell added a commit to robert-ancell/plugins that referenced this issue Jun 18, 2020
@robert-ancell robert-ancell moved this from In progress to In Review in Linux Preview Jun 18, 2020
stuartmorgan pushed a commit to flutter/plugins that referenced this issue Jun 30, 2020
Adds shared_preferences support for Linux.

Part of flutter/flutter#41720
Linux Preview automation moved this from In Review to Done Jul 8, 2020
agent3bood pushed a commit to agent3bood/flutter-plugins that referenced this issue Jul 10, 2020
jorgefspereira pushed a commit to jorgefspereira/plugins_flutter that referenced this issue Oct 10, 2020
FlutterSu pushed a commit to FlutterSu/flutter-plugins that referenced this issue Nov 20, 2020
@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 19, 2021
@flutter-triage-bot flutter-triage-bot bot added the package flutter/packages repository. See also p: labels. label Jul 5, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
a: desktop Running on desktop good first issue Relatively approachable for first-time contributors p: shared_preferences Plugin to read and write Shared Preferences P2 Important issues not at the top of the work list package flutter/packages repository. See also p: labels. platform-linux Building on or for Linux specifically
Projects
No open projects
Linux Preview
  
Done
Development

Successfully merging a pull request may close this issue.

2 participants