GoogleSignInPlatform class Null safety

The interface that implementations of google_sign_in must implement.

Platform implementations that live in a separate package should extend this class rather than implement it as google_sign_in does not consider newly added methods to be breaking changes. Extending this class (using extends) ensures that the subclass will get the default implementation, while platform implementations that implements this interface will be broken by newly added GoogleSignInPlatform methods.

Implementers

Constructors

GoogleSignInPlatform()

Properties

hashCode int
The hash code for this object. [...]
read-only, inherited
isMock bool
Only mock implementations should set this to true. [...]
@visibleForTesting, read-only
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited

Methods

clearAuthCache({required String token}) Future<void>
Clears any cached information that the plugin may be holding on to.
disconnect() Future<void>
Revokes all of the scopes that the user granted.
getTokens({required String email, bool? shouldRecoverAuth}) Future<GoogleSignInTokenData>
Returns the Tokens used to authenticate other API calls.
init({List<String> scopes = const <String>[], SignInOption signInOption = SignInOption.standard, String? hostedDomain, String? clientId}) Future<void>
Initializes the plugin. You must call this method before calling other methods. [...]
isSignedIn() Future<bool>
Returns whether the current user is currently signed in.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited
requestScopes(List<String> scopes) Future<bool>
Requests the user grants additional Oauth scopes. [...]
signIn() Future<GoogleSignInUserData?>
Signs in the user with the options specified to init.
signInSilently() Future<GoogleSignInUserData?>
Attempts to reuse pre-existing credentials to sign in again, without user interaction.
signOut() Future<void>
Signs out the current account from the application.
toString() String
A string representation of this object. [...]
inherited

Operators

operator ==(Object other) bool
The equality operator. [...]
inherited

Static Properties

instance GoogleSignInPlatform
The default instance of GoogleSignInPlatform to use. [...]
read / write