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

Conversation

@mehmetf
Copy link
Contributor

@mehmetf 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.

@mehmetf
Copy link
Contributor Author

mehmetf commented Sep 12, 2019

@collinjackson FYI


/// 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) {
Copy link
Contributor

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
Copy link
Contributor

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants