From 6676a6c4fc570ca5ebe57e82bb7de765f9087a1f Mon Sep 17 00:00:00 2001 From: Neil Self Date: Thu, 27 Feb 2025 16:52:58 -0800 Subject: [PATCH 1/2] Separate approved changes to google_sign_in_platform_interface from the rest of the PR changes. --- .../google_sign_in_platform_interface/CHANGELOG.md | 3 ++- .../google_sign_in_platform_interface/lib/src/types.dart | 6 ++++++ .../google_sign_in_platform_interface/pubspec.yaml | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/packages/google_sign_in/google_sign_in_platform_interface/CHANGELOG.md b/packages/google_sign_in/google_sign_in_platform_interface/CHANGELOG.md index fda47024354..987f6f2e197 100644 --- a/packages/google_sign_in/google_sign_in_platform_interface/CHANGELOG.md +++ b/packages/google_sign_in/google_sign_in_platform_interface/CHANGELOG.md @@ -1,5 +1,6 @@ -## NEXT +## 2.5.0 +* Add a sign-in field to allow Android clients to explicitly specify an account name. This capability is only available within Android for the underlying libraries. * Updates minimum supported SDK version to Flutter 3.22/Dart 3.4. ## 2.4.5 diff --git a/packages/google_sign_in/google_sign_in_platform_interface/lib/src/types.dart b/packages/google_sign_in/google_sign_in_platform_interface/lib/src/types.dart index 5c74450b480..057927d5164 100644 --- a/packages/google_sign_in/google_sign_in_platform_interface/lib/src/types.dart +++ b/packages/google_sign_in/google_sign_in_platform_interface/lib/src/types.dart @@ -36,6 +36,7 @@ class SignInInitParameters { this.clientId, this.serverClientId, this.forceCodeForRefreshToken = false, + this.forceAccountName, }); /// The list of OAuth scope codes to request when signing in. @@ -78,6 +79,11 @@ class SignInInitParameters { /// /// This is only used on Android. final bool forceCodeForRefreshToken; + + /// Can be used to explicitly set an account name on the underlying platform sign-in API. + /// + /// This should only be set on Android; other platforms may throw. + final String? forceAccountName; } /// Holds information about the signed in user. diff --git a/packages/google_sign_in/google_sign_in_platform_interface/pubspec.yaml b/packages/google_sign_in/google_sign_in_platform_interface/pubspec.yaml index 2581773c69d..d0156993eb3 100644 --- a/packages/google_sign_in/google_sign_in_platform_interface/pubspec.yaml +++ b/packages/google_sign_in/google_sign_in_platform_interface/pubspec.yaml @@ -4,7 +4,7 @@ repository: https://github.com/flutter/packages/tree/main/packages/google_sign_i issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+google_sign_in%22 # NOTE: We strongly prefer non-breaking changes, even at the expense of a # less-clean API. See https://flutter.dev/go/platform-interface-breaking-changes -version: 2.4.5 +version: 2.5.0 environment: sdk: ^3.4.0 From d9f83a36e095f9178e517bb342b14665f7c96151 Mon Sep 17 00:00:00 2001 From: stuartmorgan Date: Fri, 28 Feb 2025 14:13:41 -0500 Subject: [PATCH 2/2] Follow CHANGELOG style guide --- .../google_sign_in_platform_interface/CHANGELOG.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/google_sign_in/google_sign_in_platform_interface/CHANGELOG.md b/packages/google_sign_in/google_sign_in_platform_interface/CHANGELOG.md index 987f6f2e197..d12f577b7d3 100644 --- a/packages/google_sign_in/google_sign_in_platform_interface/CHANGELOG.md +++ b/packages/google_sign_in/google_sign_in_platform_interface/CHANGELOG.md @@ -1,6 +1,7 @@ ## 2.5.0 -* Add a sign-in field to allow Android clients to explicitly specify an account name. This capability is only available within Android for the underlying libraries. +* Adds a sign-in field to allow Android clients to explicitly specify an account name. + This capability is only available within Android for the underlying libraries. * Updates minimum supported SDK version to Flutter 3.22/Dart 3.4. ## 2.4.5