packages icon indicating copy to clipboard operation
packages copied to clipboard

[shared_preferences] Ports SharedPreferencesAndroid to Pigeon

Open AmanNegi opened this issue 2 years ago • 8 comments

This PR ports the SharedPreferences-Android to Pigeon. It was earlier created in flutter/plugins however it was ported to flutter/packages.

Previous PR: https://github.com/flutter/plugins/pull/7015

Pre-launch Checklist

  • [✅] I read the Contributor Guide and followed the process outlined there for submitting PRs.
  • [✅ ] I read the Tree Hygiene wiki page, which explains my responsibilities.
  • [✅] I read and followed the relevant style guides and ran the auto-formatter. (Unlike the flutter/flutter repo, the flutter/packages repo does use dart format.)
  • [✅] I signed the CLA.
  • [✅] The title of the PR starts with the name of the package surrounded by square brackets, e.g. [shared_preferences]
  • [✅] I listed at least one issue that this PR fixes in the description above.
  • [✅] I updated pubspec.yaml with an appropriate new version according to the pub versioning philosophy, or this PR is exempt from version changes.
  • [✅] I updated CHANGELOG.md to add a description of the change, following repository CHANGELOG style.
  • [✅] I updated/added relevant documentation (doc comments with ///).
  • [✅] I added new tests to check the change I am making, or this PR is test-exempt.
  • [✅ ] All existing and new tests are passing.

If you need help, consider asking for advice on the #hackers-new channel on Discord.

AmanNegi avatar Feb 28 '23 16:02 AmanNegi

Have all of the requested changes from the closed pr been made?

tarrinneal avatar Mar 01 '23 02:03 tarrinneal

Hey there @tarrinneal, I was requested by @stuartmorgan for a few changes however they were lost in the transition of moving from /plugins to /packages. I am working on those and will update you asap.

AmanNegi avatar Mar 01 '23 03:03 AmanNegi

  • [✅] The title of the PR starts with the name of the package surrounded by square brackets, e.g. [shared_preferences]

Please don't check boxes without having done the checklist item; it defeats the point of the checklist.

stuartmorgan-g avatar Mar 01 '23 03:03 stuartmorgan-g

  • [✅] The title of the PR starts with the name of the package surrounded by square brackets, e.g. [shared_preferences]

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?

AmanNegi avatar Mar 01 '23 04:03 AmanNegi

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.

stuartmorgan-g avatar Mar 02 '23 15:03 stuartmorgan-g

@AmanNegi Are you still planning on updating this PR with tests?

stuartmorgan-g avatar Mar 21 '23 19:03 stuartmorgan-g

Yeah, but I'm unable to think as to how to test theSharedPreferences object and its functionalities. Only way is to mock all the functions.

  • I will provide you the updated tests, let me know if they are fine

AmanNegi avatar Mar 22 '23 02:03 AmanNegi

I'm unable to think as to how to test theSharedPreferences object

As explained previously, the goal is not to test SharedPreferences, it is to test the plugin's code, which is SharedPreferencesPlugin and MethodCallHandlerImpl.

stuartmorgan-g avatar Mar 22 '23 10:03 stuartmorgan-g

adding @bparrishMines as a reviewer, since I can't review my own code in this pr

tarrinneal avatar Apr 10 '23 20:04 tarrinneal

Tree status is stale here; overriding.

stuartmorgan-g avatar Apr 13 '23 19:04 stuartmorgan-g

Thanks a lot @tarrinneal for helping with this. Also special thanks for @stuartmorgan for maintaining the project and guiding us.

AmanNegi avatar Apr 13 '23 19:04 AmanNegi

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!

tarrinneal avatar Apr 13 '23 22:04 tarrinneal