Skip to content
This repository has been archived by the owner on Feb 22, 2023. It is now read-only.

Exposing GoogleSignIn Delegate as an interface #404

Merged
merged 5 commits into from
Mar 3, 2018

Conversation

abykov2
Copy link
Contributor

@abykov2 abykov2 commented Mar 1, 2018

This allows for the creation of testing versions of this delegate for any other plugin that wants to use it.

@abykov2
Copy link
Contributor Author

abykov2 commented Mar 1, 2018

@mehmetf @tvolkert

Copy link
Contributor

@tvolkert tvolkert left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This'll need updates to the CHANGELOG and pubspec.yaml too

@@ -111,7 +148,7 @@ public void onMethodCall(MethodCall call, Result result) {
* completed (either successfully or in error). This class provides no synchronization consructs
* to guarantee such behavior; callers are responsible for providing such guarantees.
*/
public static final class Delegate {
public static final class DelegateImpl implements Delegate {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a breaking change. Rather than having to bump a minor version number, you could keep this Delegate and make the interface (I can't believe I'm saying this...) IDelegate. Then again, I hate myself for having said that, so maybe you just bump the minor version number 😄-- wdyt?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As discussed offline, it's probably not worth a breaking change to change the name of the Delegate class so I renamed the interface to IDelegate.

@abykov2
Copy link
Contributor Author

abykov2 commented Mar 3, 2018

Updated the class and interface names and increased the version number.

@@ -111,7 +148,7 @@ public void onMethodCall(MethodCall call, Result result) {
* completed (either successfully or in error). This class provides no synchronization consructs
* to guarantee such behavior; callers are responsible for providing such guarantees.
*/
public static final class Delegate {
public static final class Delegate implements IDelegate {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add @Override annotations on the interface methods.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

Copy link
Contributor

@tvolkert tvolkert left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM with one comment.

@tvolkert tvolkert merged commit 92aca45 into flutter:master Mar 3, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
3 participants