This repository was archived by the owner on Feb 22, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 9.8k
[shared_preferences] Shared preferences linux endorsement #2864
Merged
stuartmorgan-g
merged 13 commits into
flutter:master
from
stuartmorgan-g:shared_preferences_linux_endorsement
Jul 8, 2020
Merged
[shared_preferences] Shared preferences linux endorsement #2864
stuartmorgan-g
merged 13 commits into
flutter:master
from
stuartmorgan-g:shared_preferences_linux_endorsement
Jul 8, 2020
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Review notes:
|
cyanglaz
approved these changes
Jul 7, 2020
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
Now that plugin_tools are updated, try using path_provider again. Uses path_provider_linux directly to avoid having an actual plugin dependency for other platforms (e.g., an Android+Linux app shouldn't need to build and ship the Android path_provider plugin just because the project uses shared_preferences).
In case there are still dependency conflict issues I tried a version that uses XDG directly to avoid the problem; that passed all tests. Now that the tools are updated I'm trying going back to path_provider, although this time I'm using path_provider_linux directly to reduce the transitive plugin burden on other platforms. (That was something I had thought about a while back, but slipped my mind when reviewing shared_preferences_linux so wasn't in the initial version.) |
agent3bood
pushed a commit
to agent3bood/flutter-plugins
that referenced
this pull request
Jul 10, 2020
Endorses shared_preferences_linux. Since shared_preferences_linux is pure Dart, this uses manual registration of the Linux implementation. It is similar to the solution used for path_provider, but improves on it by more narrowly tailoring the registration to cases where another registration hasn't already been done, and only checking the first time, thus avoiding the need for a variable to override it. Updates shared_preferences_linux to depend on path_provider_linux rather than path_provider, to avoid adding unnecessary native plugin dependencies to other platforms. Also adds a driver test for shared_preference_linux, which I missed in reviewing the initial shared_preferences_linux landing.
jorgefspereira
pushed a commit
to jorgefspereira/plugins_flutter
that referenced
this pull request
Oct 10, 2020
Endorses shared_preferences_linux. Since shared_preferences_linux is pure Dart, this uses manual registration of the Linux implementation. It is similar to the solution used for path_provider, but improves on it by more narrowly tailoring the registration to cases where another registration hasn't already been done, and only checking the first time, thus avoiding the need for a variable to override it. Updates shared_preferences_linux to depend on path_provider_linux rather than path_provider, to avoid adding unnecessary native plugin dependencies to other platforms. Also adds a driver test for shared_preference_linux, which I missed in reviewing the initial shared_preferences_linux landing.
FlutterSu
pushed a commit
to FlutterSu/flutter-plugins
that referenced
this pull request
Nov 20, 2020
Endorses shared_preferences_linux. Since shared_preferences_linux is pure Dart, this uses manual registration of the Linux implementation. It is similar to the solution used for path_provider, but improves on it by more narrowly tailoring the registration to cases where another registration hasn't already been done, and only checking the first time, thus avoiding the need for a variable to override it. Updates shared_preferences_linux to depend on path_provider_linux rather than path_provider, to avoid adding unnecessary native plugin dependencies to other platforms. Also adds a driver test for shared_preference_linux, which I missed in reviewing the initial shared_preferences_linux landing.
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Endorses shared_preferences_linux.
Since shared_preferences_linux is pure Dart, this uses manual registration of the Linux implementation. It is similar to the solution used for path_provider, but improves on it by more narrowly tailoring the registration to cases where another registration hasn't already been done, and only checking the first time, thus avoiding the need for a variable to override it.
Updates shared_preferences_linux to depend on path_provider_linux rather than path_provider, to avoid adding unnecessary native plugin dependencies to other platforms.
Also adds a driver test for shared_preference_linux, which I missed in reviewing the initial shared_preferences_linux landing.
Related Issues
Fixes flutter/flutter#41720
Checklist
Before you create this PR confirm that it meets all requirements listed below by checking the relevant checkboxes (
[x]
). This will ensure a smooth and quick review process.///
).flutter analyze
) does not report any problems on my PR.Breaking Change
Does your PR require plugin users to manually update their apps to accommodate your change?