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.7k
[google_sign_in] Fix chained async methods in error handling zones #2059
Merged
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
Contributor
mehmetf
commented
Sep 12, 2019
- This is not a breaking change.
- It uses future chaining instead of method completer to make the code easier to understand and fix the bug with the error handling zones.
- Added a test for the bug fix above.
Contributor
Author
|
@collinjackson FYI |
collinjackson
approved these changes
Sep 12, 2019
|
|
||
| /// Returns a [Future] that completes with a success after [future], whether | ||
| /// it completed with a value or an error. | ||
| Future<void> _waitFor(Future<void> future) { |
Contributor
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.
nit: I would probably make this static if it doesn't access any data from the class.
| response = _callMethod(method); | ||
| } else { | ||
| response = _lastMethodCall.then((_) { | ||
| // If after the last completed call currentUser is not null and requested |
Contributor
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.
Suggested change
| // If after the last completed call currentUser is not null and requested | |
| // If after the last completed call `currentUser` is not `null` and requested |
mormih
pushed a commit
to mormih/plugins
that referenced
this pull request
Nov 17, 2019
sungmin-park
pushed a commit
to sungmin-park/flutter-plugins
that referenced
this pull request
Dec 17, 2019
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.