-
Notifications
You must be signed in to change notification settings - Fork 3k
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] Ports SharedPreferencesAndroid to Pigeon #3321
[shared_preferences] Ports SharedPreferencesAndroid to Pigeon #3321
Conversation
Have all of the requested changes from the closed pr been made? |
Hey there @tarrinneal, I was requested by @stuartmorgan for a few changes however they were lost in the transition of moving from |
Please don't check boxes without having done the checklist item; it defeats the point of the checklist. |
Sorry for that got carried in the switching transition, fixed it now. I did not receive any response regarding this. Let me know if it seems alright? |
You have not addressed my original comment, so no, this still has the same problem. This PR needs actual tests. |
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.
(Updating review status based on the above.)
@AmanNegi Are you still planning on updating this PR with tests? |
Yeah, but I'm unable to think as to how to test the
|
As explained previously, the goal is not to test |
752b9c5
to
a87ce97
Compare
adding @bparrishMines as a reviewer, since I can't review my own code in this pr |
packages/shared_preferences/shared_preferences_android/CHANGELOG.md
Outdated
Show resolved
Hide resolved
packages/shared_preferences/shared_preferences_android/pigeons/messages.dart
Show resolved
Hide resolved
packages/shared_preferences/shared_preferences_android/pigeons/messages.dart
Show resolved
Hide resolved
packages/shared_preferences/shared_preferences_android/pigeons/messages.dart
Outdated
Show resolved
Hide resolved
...ages/shared_preferences/shared_preferences_android/test/shared_preferences_android_test.dart
Outdated
Show resolved
Hide resolved
...ndroid/android/src/test/java/io/flutter/plugins/sharedpreferences/SharedPreferencesTest.java
Show resolved
Hide resolved
...ndroid/android/src/test/java/io/flutter/plugins/sharedpreferences/SharedPreferencesTest.java
Outdated
Show resolved
Hide resolved
...ndroid/android/src/test/java/io/flutter/plugins/sharedpreferences/SharedPreferencesTest.java
Outdated
Show resolved
Hide resolved
...ndroid/android/src/test/java/io/flutter/plugins/sharedpreferences/SharedPreferencesTest.java
Outdated
Show resolved
Hide resolved
...ndroid/android/src/test/java/io/flutter/plugins/sharedpreferences/SharedPreferencesTest.java
Outdated
Show resolved
Hide resolved
packages/shared_preferences/shared_preferences_android/lib/shared_preferences_android.dart
Outdated
Show resolved
Hide resolved
packages/shared_preferences/shared_preferences_android/lib/shared_preferences_android.dart
Show resolved
Hide resolved
packages/shared_preferences/shared_preferences_android/lib/shared_preferences_android.dart
Outdated
Show resolved
Hide resolved
...roid/android/src/main/java/io/flutter/plugins/sharedpreferences/SharedPreferencesPlugin.java
Outdated
Show resolved
Hide resolved
...roid/android/src/main/java/io/flutter/plugins/sharedpreferences/SharedPreferencesPlugin.java
Show resolved
Hide resolved
...roid/android/src/main/java/io/flutter/plugins/sharedpreferences/SharedPreferencesPlugin.java
Show resolved
Hide resolved
private void setUp(@NonNull BinaryMessenger messenger, @NonNull Context context) { | ||
preferences = context.getSharedPreferences(SHARED_PREFERENCES_NAME, Context.MODE_PRIVATE); | ||
try { | ||
SharedPreferencesApi.setup(messenger, this); |
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.
When detaching from the engine this
should be replaced with null
to remove the handler.
...roid/android/src/main/java/io/flutter/plugins/sharedpreferences/SharedPreferencesPlugin.java
Outdated
Show resolved
Hide resolved
...roid/android/src/main/java/io/flutter/plugins/sharedpreferences/SharedPreferencesPlugin.java
Show resolved
Hide resolved
...roid/android/src/main/java/io/flutter/plugins/sharedpreferences/SharedPreferencesPlugin.java
Show resolved
Hide resolved
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 with some final nits for things I missed. Thanks for getting this over the finish line!
...roid/android/src/main/java/io/flutter/plugins/sharedpreferences/SharedPreferencesPlugin.java
Outdated
Show resolved
Hide resolved
...roid/android/src/main/java/io/flutter/plugins/sharedpreferences/SharedPreferencesPlugin.java
Outdated
Show resolved
Hide resolved
packages/shared_preferences/shared_preferences_android/lib/shared_preferences_android.dart
Outdated
Show resolved
Hide resolved
Tree status is stale here; overriding. |
Thanks a lot @tarrinneal for helping with this. Also special thanks for @stuartmorgan for maintaining the project and guiding us. |
Thank you for getting this going! |
flutter/packages@d01f4ea...e4ec155 2023-04-14 [email protected] [shared_preferences] Remove Android lint baseline (flutter/packages#3707) 2023-04-13 [email protected] [shared_preferences] Ports SharedPreferencesAndroid to Pigeon (flutter/packages#3321) 2023-04-13 [email protected] [webview_flutter_android] Fix Android lint warnings (flutter/packages#3675) 2023-04-13 [email protected] [go_router_builder] Use only one .where() (flutter/packages#3698) 2023-04-13 [email protected] Roll Flutter from 3b4b149 to be45eb2 (21 revisions) (flutter/packages#3701) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/flutter-packages-flutter-autoroll Please CC [email protected],[email protected] on the revert to ensure that a human is aware of the problem. To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
flutter/packages@d01f4ea...e4ec155 2023-04-14 [email protected] [shared_preferences] Remove Android lint baseline (flutter/packages#3707) 2023-04-13 [email protected] [shared_preferences] Ports SharedPreferencesAndroid to Pigeon (flutter/packages#3321) 2023-04-13 [email protected] [webview_flutter_android] Fix Android lint warnings (flutter/packages#3675) 2023-04-13 [email protected] [go_router_builder] Use only one .where() (flutter/packages#3698) 2023-04-13 [email protected] Roll Flutter from 3b4b149 to be45eb2 (21 revisions) (flutter/packages#3701) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/flutter-packages-flutter-autoroll Please CC [email protected],[email protected] on the revert to ensure that a human is aware of the problem. To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
…r#3321) [shared_preferences] Ports SharedPreferencesAndroid to Pigeon
This PR ports the SharedPreferences-Android to Pigeon. It was earlier created in
flutter/plugins
however it was ported toflutter/packages
.fixes flutter/flutter#95013
fixes flutter/flutter#117914
Previous PR: flutter/plugins#7015
Pre-launch Checklist
dart format
.)[shared_preferences]
pubspec.yaml
with an appropriate new version according to the pub versioning philosophy, or this PR is exempt from version changes.CHANGELOG.md
to add a description of the change, following repository CHANGELOG style.///
).If you need help, consider asking for advice on the #hackers-new channel on Discord.