Skip to content

Commit 1faaa04

Browse files
authored
[google_sign_in] Add Android account name field as optional (platform interface changes) (#8735)
This PR contains the platform interface changes for the main PR [8573](#8573). As a whole, these changes add a new option to explicitly specify the account name on Android while signing in within the google_sign_in package. Flutter issue: [163257](flutter/flutter#163257)
1 parent 9e4684e commit 1faaa04

File tree

3 files changed

+10
-2
lines changed

3 files changed

+10
-2
lines changed

packages/google_sign_in/google_sign_in_platform_interface/CHANGELOG.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
1-
## NEXT
1+
## 2.5.0
22

3+
* Adds a sign-in field to allow Android clients to explicitly specify an account name.
4+
This capability is only available within Android for the underlying libraries.
35
* Updates minimum supported SDK version to Flutter 3.22/Dart 3.4.
46

57
## 2.4.5

packages/google_sign_in/google_sign_in_platform_interface/lib/src/types.dart

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ class SignInInitParameters {
3636
this.clientId,
3737
this.serverClientId,
3838
this.forceCodeForRefreshToken = false,
39+
this.forceAccountName,
3940
});
4041

4142
/// The list of OAuth scope codes to request when signing in.
@@ -78,6 +79,11 @@ class SignInInitParameters {
7879
///
7980
/// This is only used on Android.
8081
final bool forceCodeForRefreshToken;
82+
83+
/// Can be used to explicitly set an account name on the underlying platform sign-in API.
84+
///
85+
/// This should only be set on Android; other platforms may throw.
86+
final String? forceAccountName;
8187
}
8288

8389
/// Holds information about the signed in user.

packages/google_sign_in/google_sign_in_platform_interface/pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ repository: https://github.com/flutter/packages/tree/main/packages/google_sign_i
44
issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+google_sign_in%22
55
# NOTE: We strongly prefer non-breaking changes, even at the expense of a
66
# less-clean API. See https://flutter.dev/go/platform-interface-breaking-changes
7-
version: 2.4.5
7+
version: 2.5.0
88

99
environment:
1010
sdk: ^3.4.0

0 commit comments

Comments
 (0)