[google_sign_in] Correct method channel `clearAuthCache` declaration (#5787)
During the NNBD migrations, the platform interface version was correctly converted to `required String token`, but the implementation was instead changed to `String? token`. Since accepting a nullable type is a valid override of accepting a non-nullable type it still compiled, but added unnecessary force unwrapping to the implementations. This cleans up the default method channel implementation declaration to match the platform interface.
Fixes https://github.com/flutter/flutter/issues/129717
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 eba3544..aae4b83 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,3 +1,7 @@
+## 2.4.4
+
+* Updates `clearAuthCache` override to match base class declaration.
+
## 2.4.3
* Updates minimum supported SDK version to Flutter 3.10/Dart 3.0.
diff --git a/packages/google_sign_in/google_sign_in_platform_interface/lib/src/method_channel_google_sign_in.dart b/packages/google_sign_in/google_sign_in_platform_interface/lib/src/method_channel_google_sign_in.dart
index c3b158d..fde29ae 100644
--- a/packages/google_sign_in/google_sign_in_platform_interface/lib/src/method_channel_google_sign_in.dart
+++ b/packages/google_sign_in/google_sign_in_platform_interface/lib/src/method_channel_google_sign_in.dart
@@ -84,7 +84,7 @@
}
@override
- Future<void> clearAuthCache({String? token}) {
+ Future<void> clearAuthCache({required String token}) {
return channel.invokeMethod<void>(
'clearAuthCache',
<String, String?>{'token': token},
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 883d089..7a8822f 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 @@
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.3
+version: 2.4.4
environment:
sdk: ">=3.0.0 <4.0.0"