Viewing version 3.1.0. Open the latest package page.

google_sign_in_platform_interface

3.1.0

A common platform interface for the google_sign_in plugin.

Download archive

Readme

google_sign_in_platform_interface

A common platform interface for the google_sign_in plugin.

This interface allows platform-specific implementations of the google_sign_in plugin, as well as the plugin itself, to ensure they are supporting the same interface.

Usage

To implement a new platform-specific implementation of google_sign_in, extend GoogleSignInPlatform with an implementation that performs the platform-specific behavior, and when you register your plugin, set the default GoogleSignInPlatform by calling GoogleSignInPlatform.instance = MyPlatformGoogleSignIn().

Note on breaking changes

Strongly prefer non-breaking changes (such as adding a method to the interface) over breaking changes for this package.

See https://flutter.dev/go/platform-interface-breaking-changes for a discussion on why a less-clean interface is preferable to a breaking change.

Changelog

3.1.0

  • Adds a clearAuthorizationToken method to remove an access token from the cache.
  • Updates minimum supported SDK version to Flutter 3.29/Dart 3.7.

3.0.0

  • BREAKING CHANGE: Overhauls the entire API surface to better abstract the current set of underlying platform SDKs, and to use structured errors. See API doc comments for details on the behaviors that platform implementations must implement.
  • Updates minimum supported SDK version to Flutter 3.27/Dart 3.6.

2.5.0

  • 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

  • Updates minimum required plugin_platform_interface version to 2.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.
  • Drop dependency on package:quiver.

2.4.2

  • Adds pub topics to package metadata.
  • Updates minimum supported SDK version to Flutter 3.7/Dart 2.19.

2.4.1

  • Clarifies canAccessScopes method documentation.

2.4.0

  • Introduces: canAccessScopes method and userDataEvents stream.
    • These enable separation of Authentication and Authorization, and asynchronous sign-in operations where needed (on the web, for example!)
  • Updates minimum Flutter version to 3.3.
  • Aligns Dart and Flutter SDK constraints.

2.3.1

  • Updates links for the merge of flutter/plugins into flutter/packages.
  • Updates minimum Flutter version to 3.0.

2.3.0

  • Adopts plugin_platform_interface. As a result, isMock is deprecated in favor of the now-standard MockPlatformInterfaceMixin.

2.2.0

  • Adds support for the serverClientId parameter.

2.1.3

  • Enables mocking models by changing overridden operator == parameter type from dynamic to Object.
  • Removes unnecessary imports.
  • Adds SignInInitParameters class to hold all sign in params, including the new forceCodeForRefreshToken.

2.1.2

  • Internal code cleanup for stricter analysis options.

2.1.1

  • Removes dependency on meta.

2.1.0

  • Add serverAuthCode attribute to user data

2.0.1

  • Updates init function in MethodChannelGoogleSignIn to parametrize clientId property.

2.0.0

  • Migrate to null-safety.

1.1.3

  • Update Flutter SDK constraint.

1.1.2

  • Update lower bound of dart dependency to 2.1.0.

1.1.1

  • Add attribute serverAuthCode.

1.1.0

  • Add hasRequestedScope method to determine if an Oauth scope has been granted.
  • Add requestScope Method to request new Oauth scopes be granted by the user.

1.0.4

  • Make the pedantic dev_dependency explicit.

1.0.3

  • Remove the deprecated author: field from pubspec.yaml
  • Require Flutter SDK 1.10.0 or greater.

1.0.2

  • Add missing documentation.

1.0.1

  • Switch away from quiver_hashcode.

1.0.0

  • Initial release.

Installing

export PUB_HOSTED_URL=https://pub.mirror.p-hatan.com
flutter pub add 'google_sign_in_platform_interface:3.1.0'
pubspec.yaml
name: google_sign_in_platform_interface
description: A common platform interface for the google_sign_in plugin.
repository: https://github.com/flutter/packages/tree/main/packages/google_sign_in/google_sign_in_platform_interface
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: 3.1.0

environment:
  sdk: ^3.7.0
  flutter: ">=3.29.0"

dependencies:
  flutter:
    sdk: flutter
  plugin_platform_interface: ^2.1.7

dev_dependencies:
  flutter_test:
    sdk: flutter
  mockito: ^5.4.4

topics:
  - authentication
  - google-sign-in

Version history

VersionPublishedArchiveSHA-256
1.0.0On demandDownloadea9cb1b0…7ef24f
1.0.2On demandDownload9e21be40…23cfe0
1.0.3On demandDownload602d5007…965729
1.0.4On demandDownload54704c43…f24289
1.1.0On demandDownloadccbd7bbe…3f592c
1.1.1On demandDownload2f3f4dda…20ed55
1.1.2On demandDownload165a7894…0ffd77
2.0.0-nullsafetyOn demandDownloadb686cb28…020226
2.0.0On demandDownloadde444d64…0a409f
2.0.1On demandDownload6bc904a6…a2f919
2.1.0On demandDownload2b822dda…194d7a
2.1.1On demandDownload282fb348…dfff8a
2.1.2On demandDownload62bf8abb…79f3e5
2.1.3On demandDownload361c48a8…357c74
2.2.0On demandDownload252d0fad…cd9e87
2.3.0On demandDownload61306213…c9f457
2.3.1On demandDownloadfece762f…3d9264
2.4.0On demandDownload95a9e0a8…74ae4c
2.4.1On demandDownloade69553c0…9d4393
2.4.2On demandDownload35ceee5f…3ceec4
2.4.3On demandDownloade10eaaa3…1f9a4a
2.4.4On demandDownloaddf6c91e7…583ec4
2.4.5On demandDownload1f6e5787…0a2971
2.5.0On demandDownload5f6f79cf…30a8aa
3.0.0On demandDownload87364431…32885a
3.1.0Cached · Upstream SHA-256 matchedDownload7f59208c…965bb5

Dependencies

flutter { "sdk": "flutter" }

plugin_platform_interface "^2.1.7"