Skip to content
This repository was archived by the owner on Feb 22, 2023. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion packages/google_sign_in/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 4.0.6

* Fixed the `PlatformException` leaking from `catchError()` in debug mode.

## 4.0.5

* Update README with solution to `APIException` errors.
Expand All @@ -6,7 +10,7 @@

* Revert changes in 4.0.3.

## 4.0.3
## 4.0.3

* Update guava to `27.0.1-android`.
* Add correct @NonNull annotations to reduce compiler warnings.
Expand Down
8 changes: 6 additions & 2 deletions packages/google_sign_in/lib/google_sign_in.dart
Original file line number Diff line number Diff line change
Expand Up @@ -342,9 +342,13 @@ class _MethodCompleter {
final Completer<GoogleSignInAccount> _completer =
Completer<GoogleSignInAccount>();

void complete(FutureOr<GoogleSignInAccount> value) {
Future<void> complete(FutureOr<GoogleSignInAccount> value) async {
if (value is Future<GoogleSignInAccount>) {
value.then(_completer.complete, onError: _completer.completeError);
try {
_completer.complete(await value);
} catch (e, stacktrace) {
_completer.completeError(e, stacktrace);
}
} else {
_completer.complete(value);
}
Expand Down
2 changes: 1 addition & 1 deletion packages/google_sign_in/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ description: Flutter plugin for Google Sign-In, a secure authentication system
for signing in with a Google account on Android and iOS.
author: Flutter Team <[email protected]>
homepage: https://github.com/flutter/plugins/tree/master/packages/google_sign_in
version: 4.0.5
version: 4.0.6

flutter:
plugin:
Expand Down